Example #1
0
 /**
  * @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();
 }
Example #2
0
 public function testPersist()
 {
     $this->collector->resolve();
     $this->collector->persist();
     $this->assertInstanceOf(\Generator::class, $this->datasource->getProcess($this->process->getId()));
 }
Example #3
0
 /**
  * EventsDataSource constructor.
  */
 public function __construct(Process $process, DataSourceInterface $dataSource, JsonPatch $jsonPatch = null)
 {
     $this->initialCpuUsage = $this->getUsage();
     parent::__construct($process, $dataSource, $jsonPatch);
 }
Example #4
0
 /**
  * EventsDataSource constructor.
  */
 public function __construct(Process $process, DataSourceInterface $dataSource, JsonPatch $jsonPatch = null)
 {
     $this->start = microtime(true);
     parent::__construct($process, $dataSource, $jsonPatch);
 }