MCPcopy Create free account
hub / github.com/codemistic/Web-Development / timeBenchmark

Method timeBenchmark

text-to-qr/lib/phpqrcode/phpqrcode.php:271–298  ·  view source on GitHub ↗

----------------------------------------------------------------------

()

Source from the content-addressed store, hash-verified

269
270 //----------------------------------------------------------------------
271 public static function timeBenchmark()
272 {
273 self::markTime('finish');
274
275 $lastTime = 0;
276 $startTime = 0;
277 $p = 0;
278
279 echo '<table cellpadding="3" cellspacing="1">
280 <thead><tr style="border-bottom:1px solid silver"><td colspan="2" style="text-align:center">BENCHMARK</td></tr></thead>
281 <tbody>';
282
283 foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) {
284 if ($p > 0) {
285 echo '<tr><th style="text-align:right">till '.$markerId.': </th><td>'.number_format($thisTime-$lastTime, 6).'s</td></tr>';
286 } else {
287 $startTime = $thisTime;
288 }
289
290 $p++;
291 $lastTime = $thisTime;
292 }
293
294 echo '</tbody><tfoot>
295 <tr style="border-top:2px solid black"><th style="text-align:right">TOTAL: </th><td>'.number_format($lastTime-$startTime, 6).'s</td></tr>
296 </tfoot>
297 </table>';
298 }
299
300 }
301

Callers

nothing calls this directly

Calls 1

markTimeMethod · 0.95

Tested by

no test coverage detected