From f66fc04efea8d09a9d41e7efff11aad7e5237630 Mon Sep 17 00:00:00 2001 From: Luke Gorrie Date: Mon, 1 Jan 2018 11:09:44 +0000 Subject: [PATCH] testsuite/bench: Fix awk parsing of perf output The awk code for extracting the instructions and cycles counts from the perf output was not working. Likely I had updated perf to an incompatible version and pushed that without testing. Naughty me. --- testsuite/bench/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/bench/default.nix b/testsuite/bench/default.nix index 8d95a071d2..717fd94a38 100644 --- a/testsuite/bench/default.nix +++ b/testsuite/bench/default.nix @@ -48,8 +48,8 @@ let benchmark = letter: name: src: args: run: for result in result/*.perf; do version=${name} benchmark=$(basename -s.perf -a $result) - instructions=$(awk -F, -e '$3 == "instructions" { print $1; }' $result) - cycles=$( awk -F, -e '$3 == "cycles" { print $1; }' $result) + instructions=$(awk -F, -e '$3 ~ "^instructions" { print $1; }' $result) + cycles=$( awk -F, -e '$3 ~ "^cycles" { print $1; }' $result) echo ${letter},$version,$benchmark,${toString run},$instructions,$cycles >> $out/bench.csv done '';