MCPcopy Create free account
hub / github.com/vercel/vercel / render_flamegraph_links

Function render_flamegraph_links

packages/python-analysis/scripts/profile-wasm.py:625–639  ·  view source on GitHub ↗

Render links to generated flamegraphs.

(output_dir)

Source from the content-addressed store, hash-verified

623
624
625def render_flamegraph_links(output_dir):
626 """Render links to generated flamegraphs."""
627 header("Flamegraphs")
628 svgs = [
629 ("code-flamegraph.svg", "Code size by crate", CYAN),
630 ("data-flamegraph.svg", "Data size by crate", MAGENTA),
631 ("combined-flamegraph.svg", "Combined (code + data)", BLUE),
632 ]
633 for filename, desc, c in svgs:
634 p = output_dir / filename
635 if p.exists():
636 sz = format_bytes(p.stat().st_size)
637 link = hyperlink(file_url(p), str(p))
638 iprint(f"{c}{BAR_FULL}{RESET} {desc}")
639 iprint(f" {DIM}{link} ({sz}){RESET}")
640
641
642# ---------------------------------------------------------------------------

Callers 1

mainFunction · 0.85

Calls 6

format_bytesFunction · 0.85
hyperlinkFunction · 0.85
file_urlFunction · 0.85
iprintFunction · 0.85
statMethod · 0.80
headerFunction · 0.70

Tested by

no test coverage detected