add summary [ci skip]

This commit is contained in:
Steven Van Acker 2017-03-10 15:53:50 +01:00
parent 6cb4058d12
commit 5a9c226a0e
2 changed files with 23 additions and 0 deletions

View file

@ -84,3 +84,9 @@ xspy | ![fail](fail.png) | ![fail](fail.png) | ![success](success.png) | ![succe
yafu | ![success](success.png) | ![success](success.png) | ![success](success.png) | ![success](success.png)
z3 | ![fail](fail.png) | ![success](success.png) | ![success](success.png) | ![success](success.png)
zsteg | ![success](success.png) | ![fail](fail.png) | ![success](success.png) | ![fail](fail.png)
| archlinux | fedora | trusty | xenial
----- | ----- | ----- | ----- | -----
![success](success.png) | 54 | 37 | 73 | 67
![fail](fail.png) | 29 | 47 | 11 | 17
![unknown](unknown.png) | 1 | 0 | 0 | 0
total | 84 | 84 | 84 | 84

View file

@ -10,6 +10,7 @@ if __name__ == "__main__":
print(" | ".join([""] + distros))
print(" | ".join(["-----"] * (1+len(distros))))
summary = {}
for tool in tools:
parts = []
for distro in distros:
@ -17,4 +18,20 @@ if __name__ == "__main__":
if tool in timingdata[distro]:
val = "success" if timingdata[distro][tool]["success"] else "fail"
parts += [val]
if distro not in summary:
summary[distro] = {
"unknown": 0,
"success": 0,
"fail": 0,
"total": 0,
}
summary[distro][val] += 1
summary[distro]["total"] += 1
print(" | ".join([tool] + ["![{0}]({0}.png)".format(x) for x in parts]))
print(" | ".join([""] + distros))
print(" | ".join(["-----"] * (1+len(distros))))
for x in ["success", "fail", "unknown"]:
print(" | ".join(["![{0}]({0}.png)".format(x)] + ["{}".format(summary[d][x]) for d in distros]))
for x in ["total"]:
print(" | ".join([x] + ["{}".format(summary[d][x]) for d in distros]))