summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Peres <martin.peres@linux.intel.com>2015-08-13 14:37:40 +0300
committerMartin Peres <martin.peres@linux.intel.com>2015-08-13 14:37:40 +0300
commit7f9146d6d33851b6884f4805bb3fa775d8f2e90e (patch)
treef3fb60776233459ecea6d776a60b88ce4f48d6fa
parent2b746a76e303f0c66e87a3bd61125f0122210d81 (diff)
stats/gen_report: add a 2% box around the avg in the benchmark results
This allows a reading the results much faster.
-rwxr-xr-xstats/gen_report.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/stats/gen_report.py b/stats/gen_report.py
index acfa7a7..c4c1236 100755
--- a/stats/gen_report.py
+++ b/stats/gen_report.py
@@ -1,5 +1,6 @@
#!/usr/bin/python3
+from matplotlib.patches import Rectangle
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
from scipy.stats import gaussian_kde
@@ -308,7 +309,12 @@ for c in range (0, len(commits)):
plt.ylabel('Frametime (ms)')
else:
plt.ylabel('FPS')
+
+ YAvg = mean(x)
+ boxYMin = YAvg * 0.99
+ boxYMax = YAvg * 1.01
ax1.plot(x, label="cur.")
+ ax1.add_patch(Rectangle((0, boxYMin), len(x), boxYMax - boxYMin, alpha=.2, facecolor="green", label="2% box"))
if c > 0:
ax1.plot(commits[c - 1].results[r].data, label="prev.")
plt.legend()