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