コード例 #1
0
ファイル: StreamCollector.php プロジェクト: ndrx-io/profiler
 /**
  * @param Process $process
  * @param DataSourceInterface $dataSource
  * @param JsonPatch|null $jsonPatch
  */
 public function __construct(Process $process, DataSourceInterface $dataSource, JsonPatch $jsonPatch = null)
 {
     parent::__construct($process, $dataSource, $jsonPatch);
     // create logs domain
     $patch = $this->jsonPatch->generate($this->getPath(), JsonPatch::ACTION_ADD, [], false);
     $this->dataSource->save($this->process, [$patch]);
     $this->registerListeners();
 }
コード例 #2
0
ファイル: CpuUsage.php プロジェクト: ndrx-io/profiler
 /**
  * EventsDataSource constructor.
  */
 public function __construct(Process $process, DataSourceInterface $dataSource, JsonPatch $jsonPatch = null)
 {
     $this->initialCpuUsage = $this->getUsage();
     parent::__construct($process, $dataSource, $jsonPatch);
 }
コード例 #3
0
ファイル: Duration.php プロジェクト: ndrx-io/profiler
 /**
  * EventsDataSource constructor.
  */
 public function __construct(Process $process, DataSourceInterface $dataSource, JsonPatch $jsonPatch = null)
 {
     $this->start = microtime(true);
     parent::__construct($process, $dataSource, $jsonPatch);
 }