function perfmon_test_cpu in Performance monitor 7
Same name and namespace in other branches
- 8 perfmon.module \perfmon_test_cpu()
Test CPU.
1 string reference to 'perfmon_test_cpu'
- _perfmon_performance_tests in ./
perfmon.inc - Core Perfmon checks.
File
- ./
perfmon.inc, line 190 - Stand-alone perfmon test system.
Code
function perfmon_test_cpu() {
$exectime = 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);
$exectime += $endtime - $starttime;
}
return array(
'result' => round(1 / ($exectime / $count), 0),
'value' => '0',
);
}