benchmark: output baseline
authorFlorian Dold <florian.dold@gmail.com>
Thu, 27 Sep 2018 13:16:18 +0000 (15:16 +0200)
committerFlorian Dold <florian.dold@gmail.com>
Thu, 27 Sep 2018 13:16:18 +0000 (15:16 +0200)
contrib/benchmark/collect.awk

index 39bbdf5ac65ad781c257388ab0472672039ac41b..46ec23d4200b93468bfdc8c174d84d12f5e65d59 100644 (file)
@@ -88,4 +88,11 @@ END {
   if (total_ops) {
     print "total_ops_ms", total_ops;
   }
+
+  # Invoke awk with -V baseline_out=<filename> to extract baseline average
+  if (baseline_out) {
+    for (x in op) {
+      print "op_baseline", x, "time_avg_us", avg(op[x]["time_us"], op[x]["count"]) > baseline_out
+    }
+  }
 }