MCPcopy Index your code
hub / github.com/python/cpython / _generate_output_filename

Function _generate_output_filename

Lib/profiling/sampling/cli.py:610–624  ·  view source on GitHub ↗

Generate output filename based on format and PID. Args: format_type: The output format pid: Process ID Returns: Generated filename

(format_type, pid)

Source from the content-addressed store, hash-verified

608
609
610def _generate_output_filename(format_type, pid):
611 """Generate output filename based on format and PID.
612
613 Args:
614 format_type: The output format
615 pid: Process ID
616
617 Returns:
618 Generated filename
619 """
620 extension = FORMAT_EXTENSIONS.get(format_type, "txt")
621 # For heatmap, use cleaner directory name without extension
622 if format_type == "heatmap":
623 return f"heatmap_{pid}"
624 return f"{format_type}_{pid}.{extension}"
625
626
627def _open_in_browser(path):

Callers 4

_handle_outputFunction · 0.85
_handle_attachFunction · 0.85
_handle_runFunction · 0.85
_handle_replayFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…