public function testProfiler() { $profiler = \Magelight\Profiler::getInstance('test'); $index = $profiler->startNewProfiling(); usleep(200000); $profiler->finish($index); $data = $profiler->getProfile($index); $this->assertTrue($data['sec'] > floatval('0.2')); }
/** * Get profiler * * @return \Magelight\Profiler */ public function getProfiler() { return \Magelight\Profiler::getInstance($this->dsn); }