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

Function render_profiling_data

benchmarks/src/postprocessing/monitor.py:482–507  ·  view source on GitHub ↗
(report: ClusterReport)

Source from the content-addressed store, hash-verified

480
481
482def render_profiling_data(report: ClusterReport):
483 def render_process(arg):
484 key, records = arg
485
486 def render_profiler_record(arg):
487 tag, file = arg
488 if tag == FlamegraphProfiler.TAG:
489 name = "Flamegraph"
490 widget = render_flamegraph_from_records(file)
491 elif tag == PerfEventsProfiler.TAG:
492 name = "Perf. events"
493 widget = render_perf_events(file)
494 elif tag == CachegrindProfiler.TAG:
495 name = "Cachegrind"
496 widget = render_cachegrind_events(file)
497 else:
498 name = "Unknown"
499 msg = f"Unknown profiler tag encountered: `{tag}` ({file})"
500 logging.warning(msg)
501 widget = Div(text=msg)
502 return Panel(child=widget, title=name)
503
504 tabs = create_tabs(list(records.items()), render_profiler_record)
505 return Panel(child=tabs, title=key)
506
507 return create_tabs(list(report.profiling_data.items()), render_process)
508
509
510def load_process_output(path: Path) -> str:

Callers 1

render_hq_comparisonFunction · 0.85

Calls 1

create_tabsFunction · 0.85

Tested by

no test coverage detected