| OLD | NEW |
| 1 <?php | 1 <?php |
| 2 /* | 2 /* |
| 3 This is called every 15 minutes as long as agents are polling for work | 3 This is called every 15 minutes as long as agents are polling for work |
| 4 */ | 4 */ |
| 5 chdir('..'); | 5 chdir('..'); |
| 6 require 'common.inc'; | 6 require 'common.inc'; |
| 7 require 'testStatus.inc'; | 7 require 'testStatus.inc'; |
| 8 require 'breakdown.inc'; | 8 require 'breakdown.inc'; |
| 9 require_once('archive.inc'); | 9 require_once('archive.inc'); |
| 10 set_time_limit(36000); | 10 set_time_limit(36000); |
| 11 ignore_user_abort(true); | 11 ignore_user_abort(true); |
| 12 error_reporting(E_ERROR | E_PARSE); | 12 error_reporting(E_ERROR | E_PARSE); |
| 13 $debug=true; | 13 $debug=true; |
| 14 if (!is_dir('./log')) | 14 if (!is_dir('./log')) |
| 15 mkdir('./log', 0777, true); | 15 mkdir('./log', 0777, true); |
| 16 if (is_file('./settings/custom_benchmark.inc')) | 16 if (is_file('./settings/custom_benchmark.inc')) |
| 17 include ('./settings/custom_benchmark.inc'); | 17 include ('./settings/custom_benchmark.inc'); |
| 18 | 18 |
| 19 $logFile = 'benchmark.log'; | 19 $logFile = 'benchmark.log'; |
| 20 | 20 |
| 21 header ("Content-type: text/plain"); | 21 header ("Content-type: text/plain"); |
| 22 | 22 |
| 23 $nonZero = array('TTFB', 'bytesOut', 'bytesOutDoc', 'bytesIn', 'bytesInDoc', 'co nnections', 'requests', 'requestsDoc', 'render',· | 23 $nonZero = array('TTFB', 'basePageSSLTime', 'bytesOut', 'bytesOutDoc', 'bytesIn' , 'bytesInDoc', 'connections', 'requests', 'requestsDoc', 'render',· |
| 24 'fullyLoaded', 'docTime', 'domElements', 'titleTime', 'domConten tLoadedEventStart', 'visualComplete', 'SpeedIndex',· | 24 'fullyLoaded', 'docTime', 'domElements', 'titleTime', 'domConten tLoadedEventStart', 'visualComplete', 'SpeedIndex',· |
| 25 'VisuallyCompleteDT', 'SpeedIndexDT', 'lastVisualChange'); | 25 'VisuallyCompleteDT', 'SpeedIndexDT', 'lastVisualChange'); |
| 26 | 26 |
| 27 // see if we need to actuall process the given benchmark | 27 // see if we need to actuall process the given benchmark |
| 28 if (array_key_exists('benchmark', $_GET) && strlen($_GET['benchmark'])) { | 28 if (array_key_exists('benchmark', $_GET) && strlen($_GET['benchmark'])) { |
| 29 $benchmark = trim($_GET['benchmark']); | 29 $benchmark = trim($_GET['benchmark']); |
| 30 if (is_file("./settings/benchmarks/$benchmark.php")) { | 30 if (is_file("./settings/benchmarks/$benchmark.php")) { |
| 31 $logFile = "bm-$benchmark.log"; | 31 $logFile = "bm-$benchmark.log"; |
| 32 // see if we are using API keys | 32 // see if we are using API keys |
| 33 $key = null; | 33 $key = null; |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 $info = json_decode(file_get_contents("./results/benchmarks/$benchmark/a ggregate/info.json"), true); | 526 $info = json_decode(file_get_contents("./results/benchmarks/$benchmark/a ggregate/info.json"), true); |
| 527 } else { | 527 } else { |
| 528 $info = array('runs' => array()); | 528 $info = array('runs' => array()); |
| 529 } | 529 } |
| 530 ···· | 530 ···· |
| 531 if (!array_key_exists('runs', $info)) { | 531 if (!array_key_exists('runs', $info)) { |
| 532 $info['runs'] = array(); | 532 $info['runs'] = array(); |
| 533 } | 533 } |
| 534 ···· | 534 ···· |
| 535 // store a list of metrics that we aggregate in the info block | 535 // store a list of metrics that we aggregate in the info block |
| 536 $info['metrics'] = array('TTFB', 'bytesOut', 'bytesOutDoc', 'bytesIn', 'byte sInDoc',· | 536 $info['metrics'] = array('TTFB', 'basePageSSLTime', 'bytesOut', 'bytesOutDoc ', 'bytesIn', 'bytesInDoc',· |
| 537 'connections', 'requests', 'requestsDoc', 'rende r',· | 537 'connections', 'requests', 'requestsDoc', 'rende r',· |
| 538 'fullyLoaded', 'docTime', 'domTime', 'score_cach e', 'score_cdn', | 538 'fullyLoaded', 'docTime', 'domTime', 'score_cach e', 'score_cdn', |
| 539 'score_gzip', 'score_keep-alive', 'score_compres s', 'gzip_total', 'gzip_savings', | 539 'score_gzip', 'score_keep-alive', 'score_compres s', 'gzip_total', 'gzip_savings', |
| 540 'image_total', 'image_savings', 'domElements', ' titleTime', 'loadEvent-Time',· | 540 'image_total', 'image_savings', 'domElements', ' titleTime', 'loadEvent-Time',· |
| 541 'domContentLoadedEventStart', 'domContentLoadedE vent-Time', 'visualComplete', 'lastVisualChange', | 541 'domContentLoadedEventStart', 'domContentLoadedE vent-Time', 'visualComplete', 'lastVisualChange', |
| 542 'js_bytes', 'js_requests', 'css_bytes', 'css_req uests', 'image_bytes', 'image_requests', | 542 'js_bytes', 'js_requests', 'css_bytes', 'css_req uests', 'image_bytes', 'image_requests', |
| 543 'flash_bytes', 'flash_requests', 'html_bytes', ' html_requests', 'text_bytes', 'text_requests', | 543 'flash_bytes', 'flash_requests', 'html_bytes', ' html_requests', 'text_bytes', 'text_requests', |
| 544 'other_bytes', 'other_requests', 'SpeedIndex', ' responses_404', | 544 'other_bytes', 'other_requests', 'SpeedIndex', ' responses_404', |
| 545 'responses_other', 'browser_version', 'server_rt t', 'docCPUms'); | 545 'responses_other', 'browser_version', 'server_rt t', 'docCPUms'); |
| 546 require_once('benchmarks/data.inc.php'); | 546 require_once('benchmarks/data.inc.php'); |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 break; | 919 break; |
| 920 } | 920 } |
| 921 } | 921 } |
| 922 } | 922 } |
| 923 $data[] = $test_data[$median_run_index]; | 923 $data[] = $test_data[$median_run_index]; |
| 924 } | 924 } |
| 925 } | 925 } |
| 926 } | 926 } |
| 927 } | 927 } |
| 928 ?> | 928 ?> |
| OLD | NEW |