summaryrefslogtreecommitdiff
path: root/contrib/benchmark
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-24 19:30:55 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-24 19:30:55 +0200
commit11abc0ca801911ab584798d95f7c955933050226 (patch)
treeac3e48fee67a76f259945560fa8780aa405890a2 /contrib/benchmark
parent58a12be5d2843d76c185d93c690a8e6d835824fc (diff)
benchmark: ugh, fix stdev again
Diffstat (limited to 'contrib/benchmark')
-rw-r--r--contrib/benchmark/collect.awk8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/benchmark/collect.awk b/contrib/benchmark/collect.awk
index 12ece0ebf..b91a978b6 100644
--- a/contrib/benchmark/collect.awk
+++ b/contrib/benchmark/collect.awk
@@ -31,13 +31,17 @@
t = $6;
op[$2]["count"] += n;
op[$2]["time_us"] += t;
- op[$2]["time_us_sq"] += n * (t/n) * (t/n);
+ if (n > 0) {
+ op[$2]["time_us_sq"] += n * (t/n) * (t/n);
+ }
} else if ($1 == "url") {
n = $6;
t = $8;
url[$2][$4]["count"] += n;
url[$2][$4]["time_us"] += t;
- url[$2][$4]["time_us_sq"] += n * (t/n) * (t/n);
+ if (n > 0) {
+ url[$2][$4]["time_us_sq"] += n * (t/n) * (t/n);
+ }
}
}