summaryrefslogtreecommitdiff
path: root/contrib/benchmark
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-27 15:25:53 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-27 15:25:53 +0200
commitf885cf0630c3322cf00a9add64e6bf16bea663bc (patch)
treed0e26ef028b335fde815bcb0d957d2bf90ef8938 /contrib/benchmark
parent4e06e1dea7545925e0d52c70ec6522aa48ead9bd (diff)
benchmark: output adjusted total time
Diffstat (limited to 'contrib/benchmark')
-rw-r--r--contrib/benchmark/collect.awk14
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/benchmark/collect.awk b/contrib/benchmark/collect.awk
index 46ec23d42..b88b3dc7d 100644
--- a/contrib/benchmark/collect.awk
+++ b/contrib/benchmark/collect.awk
@@ -51,6 +51,11 @@ function abs(v) {
}
max = url[$2][$4]["time_us_max"];
url[$2][$4]["time_us_max"] = (t/n > max ? t/n : max)
+ } else if ($1 == "op_baseline") {
+ # take average time for operations from baseline values with format:
+ # op_baseline <opname> time_avg_us <t>
+ op_baseline[$2] = $4;
+ have_baseline = 1;
}
}
@@ -95,4 +100,13 @@ END {
print "op_baseline", x, "time_avg_us", avg(op[x]["time_us"], op[x]["count"]) > baseline_out
}
}
+
+ if (have_baseline) {
+ for (x in op) {
+ total_ops_adjusted[x] = op_baseline[x] * op[x]["count"];
+ }
+ for (x in op) {
+ print "total_ops_adjusted_ms", total_ops_adjusted[x];
+ }
+ }
}