(entry: BenchmarkEntry)
| 60 | |
| 61 | |
| 62 | def render_benchmark(entry: BenchmarkEntry): |
| 63 | with open(os.path.join(os.path.dirname(__file__), "templates/benchmark.html")) as file: |
| 64 | template = file.read() |
| 65 | |
| 66 | node_utilization = { |
| 67 | node.hostname: { |
| 68 | "cpu": average([average(record.resources.cpu) for record in records]), |
| 69 | "memory": average([record.resources.mem for record in records]), |
| 70 | } |
| 71 | for (node, records) in entry.report.monitoring.items() |
| 72 | } |
| 73 | return render(template, benchmark=entry, node_utilization=node_utilization) |
| 74 | |
| 75 | |
| 76 | def render_hq_comparison(entries: List[BenchmarkEntry]): |
no test coverage detected