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

Function symbol_to_path

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

Break a demangled symbol into path components for flamegraph hierarchy.

(symbol)

Source from the content-addressed store, hash-verified

435
436
437def symbol_to_path(symbol):
438 """Break a demangled symbol into path components for flamegraph hierarchy."""
439 symbol = re.sub(r"::h[0-9a-f]{8,16}$", "", symbol)
440 parts = symbol.split("::")
441 if len(parts) > 4:
442 parts = parts[:3] + ["::".join(parts[3:])]
443 return parts
444
445
446def generate_flamegraph(folded_stacks, output_path, title):

Callers 1

build_folded_stacksFunction · 0.85

Calls 2

splitMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected