File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ benchmark ()
88
99 echo " ab -c 10 -t 3 $url "
1010 ab -c 10 -t 3 " $url " > " $ab_log "
11- curl --dump-header " $benchmark_data " " $url " > " $output "
11+ curl -H ' X-Include-Benchmark-Output-Data: 1 ' - -dump-header " $benchmark_data " " $url " > " $output "
1212
1313 rps=` grep " Requests per second:" " $ab_log " | cut -f 7 -d " " `
1414 memory=` grep " X-Benchmark-Output-Data:" " $benchmark_data " | cut -f 2 -d ' :' | cut -f 2 -d ' ' `
Original file line number Diff line number Diff line change 11<?php
22
3+ // Only calculate output data if specifically requested
4+ $ headers = getallheaders ();
5+ if (!isset ($ headers ["X-Include-Benchmark-Output-Data " ])) {
6+ return ;
7+ }
8+
39// Get benchmark output data
410$ real_usage = null ;
511if (defined ('HHVM_VERSION ' )) {
You can’t perform that action at this time.
0 commit comments