public function format($group, Benchmark $b) { if ($group != '') { $group .= '::'; } echo sprintf("%s ... %d loops in %f ms\n", $group . $b->name, $b->n, $b->T() * 1000.0); }
public function StaticDecryptMore(Benchmark $b) { $code = $this->b->encrypt('123456'); $b->reset(); for ($i = 0; $i < $b->n; $i++) { Base32::D($code); } }
function BenchmarkXarrayAdd(Benchmark $b) { $arr = array(); $b->resetTimer(); for ($i = 0; $i < $b->N(); $i++) { array_add($arr, "a", 1); } }