Exemple #1
0
 public static function generate(Profiler $profiler, AggregateInterface $aggregator)
 {
     foreach ($profiler->getProfiles() as $profile) {
         $aggregator->processProfile($profile);
     }
     return $aggregator;
 }
Exemple #2
0
 public function testProfiler()
 {
     $prof = new Profiler();
     $prof->start();
     $this->assertCount(0, $prof->getProfiles());
     $prof->end();
     $this->assertCount(1, $prof->getProfiles());
     $this->assertInstanceOf("Dux\\Profile", current($prof->getProfiles()));
 }