function test_benchmark($arr_cfg)
{
    $time_start = microtime(true);
    $arr_return = array();
    $arr_return['version'] = '1.0';
    $arr_return['sysinfo']['time'] = date("Y-m-d H:i:s");
    $arr_return['sysinfo']['php_version'] = PHP_VERSION;
    $arr_return['sysinfo']['platform'] = PHP_OS;
    $arr_return['sysinfo']['server_name'] = $_SERVER['SERVER_NAME'];
    $arr_return['sysinfo']['server_addr'] = $_SERVER['SERVER_ADDR'];
    test_math($arr_return);
    test_string($arr_return);
    test_loops($arr_return);
    test_ifelse($arr_return);
    if (isset($arr_cfg['db.host'])) {
        test_mysql($arr_return, $arr_cfg);
    }
    $arr_return['total'] = timer_diff($time_start);
    return $arr_return;
}
Beispiel #2
0
function test_benchmark($settings)
{
    $timeStart = microtime(true);
    $result = array();
    $result['version'] = '1.1';
    $result['sysinfo']['time'] = date("Y-m-d H:i:s");
    $result['sysinfo']['php_version'] = PHP_VERSION;
    $result['sysinfo']['platform'] = PHP_OS;
    $result['sysinfo']['server_name'] = $_SERVER['SERVER_NAME'];
    $result['sysinfo']['server_addr'] = $_SERVER['SERVER_ADDR'];
    test_math($result);
    test_string($result);
    test_loops($result);
    test_ifelse($result);
    if (isset($settings['db.host'])) {
        test_mysql($result, $settings);
        test_mysqli($result, $settings);
    }
    $result['total'] = timer_diff($timeStart);
    return $result;
}