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

Function _parse_mode

Lib/profiling/sampling/cli.py:191–199  ·  view source on GitHub ↗

Convert mode string to mode constant.

(mode_string)

Source from the content-addressed store, hash-verified

189
190
191def _parse_mode(mode_string):
192 """Convert mode string to mode constant."""
193 mode_map = {
194 "wall": PROFILING_MODE_WALL,
195 "cpu": PROFILING_MODE_CPU,
196 "gil": PROFILING_MODE_GIL,
197 "exception": PROFILING_MODE_EXCEPTION,
198 }
199 return mode_map[mode_string]
200
201
202def _check_process_died(process):

Callers 5

_handle_attachFunction · 0.85
_handle_runFunction · 0.85
_handle_live_attachFunction · 0.85
_handle_live_runFunction · 0.85

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…