function perfmon_test_cpu in Performance monitor 8
Same name and namespace in other branches
- 7 perfmon.inc \perfmon_test_cpu()
Test CPU.
1 string reference to 'perfmon_test_cpu'
- _perfmon_performance_tests in ./
perfmon.module - Core Perfmon checks.
File
- ./
perfmon.module, line 181 - Stand-alone perfmon test system.
Code
function perfmon_test_cpu() {
$executeTime = 0;
$count = 100000;
for ($i = 0; $i < $count; $i++) {
$starttime = microtime(TRUE);
$test = 0;
$test++;
$test--;
$test = 2 / 5;
$test = 2 * 5;
$endtime = microtime(TRUE);
$executeTime += $endtime - $starttime;
}
return array(
'result' => round(1 / ($executeTime / $count), 0),
'value' => '0',
);
}