Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Last active Feb 4, 2016
Embed
What would you like to do?
【PHP】シンプルなベンチマーククラスの使い方
<?php
$benchmark = new Benchmark();
$benchmark->mark("start");
sleep(5);
$benchmark->mark("stop");
sleep(5);
$benchmark->mark("end");
try {
echo $benchmark->getTime("start", "stop") . PHP_EOL;
echo $benchmark->getTime("start", "end") . PHP_EOL;
} catch (Exception $ex) {
echo $ex->getMessage();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment