We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb5ecbf commit 4a64560Copy full SHA for 4a64560
benchmarks/_functions.sh
@@ -8,7 +8,7 @@ benchmark ()
8
9
echo "ab -c 10 -t 3 $url"
10
ab -c 10 -t 3 "$url" > "$ab_log"
11
- curl --dump-header "$benchmark_data" "$url" > "$output"
+ curl -H 'X-Include-Benchmark-Output-Data: 1' --dump-header "$benchmark_data" "$url" > "$output"
12
13
rps=`grep "Requests per second:" "$ab_log" | cut -f 7 -d " "`
14
memory=`grep "X-Benchmark-Output-Data:" "$benchmark_data" | cut -f 2 -d ':' | cut -f 2 -d ' '`
libs/output_data.php
@@ -1,5 +1,11 @@
1
<?php
2
3
+// Only calculate output data if specifically requested
4
+$headers = getallheaders();
5
+if (!isset($headers["X-Include-Benchmark-Output-Data"])) {
6
+ return;
7
+}
+
// Get benchmark output data
$real_usage = null;
if (defined('HHVM_VERSION')) {
0 commit comments