MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / render_benchmark

Function render_benchmark

benchmarks/src/postprocessing/overview.py:62–73  ·  view source on GitHub ↗
(entry: BenchmarkEntry)

Source from the content-addressed store, hash-verified

60
61
62def 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
76def render_hq_comparison(entries: List[BenchmarkEntry]):

Callers 1

render_environmentFunction · 0.85

Calls 2

averageFunction · 0.85
renderFunction · 0.70

Tested by

no test coverage detected