function perfmon_test_db_write in Performance monitor 8
Same name and namespace in other branches
- 7 perfmon.inc \perfmon_test_db_write()
Test db write operations.
1 string reference to 'perfmon_test_db_write'
- _perfmon_performance_tests in ./
perfmon.module - Core Perfmon checks.
File
- ./
perfmon.module, line 268 - Stand-alone perfmon test system.
Code
function perfmon_test_db_write() {
$executeTime = 0;
$count = 1000;
\Drupal::database()
->truncate('perfmon_test')
->execute();
$executeTime = microtime(TRUE);
perfmon_test_db_prepare('test_db_write', $count);
$executeTime = microtime(TRUE) - $executeTime;
return array(
'result' => round(1 / ($executeTime / $count), 0),
'value' => '0',
);
}