Exemple #1
0
 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'));
 }
Exemple #2
0
 /**
  * Get profiler
  *
  * @return \Magelight\Profiler
  */
 public function getProfiler()
 {
     return \Magelight\Profiler::getInstance($this->dsn);
 }