From 87eb88f15d5505c75c101c8f6277778dba6be660 Mon Sep 17 00:00:00 2001 From: Nate Berkopec Date: Mon, 11 May 2020 10:41:12 +0900 Subject: [PATCH] Make new benchmark output to tmp --- benchmarks/wrk/cpu_spin.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benchmarks/wrk/cpu_spin.sh b/benchmarks/wrk/cpu_spin.sh index 0642ad00..2dcb63c6 100755 --- a/benchmarks/wrk/cpu_spin.sh +++ b/benchmarks/wrk/cpu_spin.sh @@ -51,7 +51,8 @@ ms() { } run_wrk() { - result=$(wrk -H "Connection: Close" -c "$wrk_c" -t "$wrk_t" -d "$DURATION" --latency "$@" | tee -a wrk.txt) + mkdir tmp &>/dev/null || true + result=$(wrk -H "Connection: Close" -c "$wrk_c" -t "$wrk_t" -d "$DURATION" --latency "$@" | tee -a tmp/wrk.txt) req_sec=$(echo "$result" | grep "^Requests/sec:" | awk '{print $2}') latency_avg=$(echo "$result" | grep "^\s*Latency.*%" | awk '{print $2}' | ms) latency_stddev=$(echo "$result" | grep "^\s*Latency.*%" | awk '{print $3}' | ms)