Example #1
0
 public function report($title = '')
 {
     $this->tock();
     if ($title) {
         _eprintln(sprintf('-- %s', $title));
     }
     $total = array_sum($this->data);
     foreach ($this->data as $key => $time) {
         _eprintln(sprintf('%s: %.2f%%', $key, 100 * $time / $total));
     }
     _eprintln(sprintf('-- total: %.3fs', $total));
 }
Example #2
0
 public function done()
 {
     _eprintln();
 }