All docs
lsdtools.profiling reference
Generated public SDK reference for lsdtools.profiling.
SDK distribution 1.0.0; API contract 1.0; generator 1.0.0.
Product source digest: 4ea39055732e8883c03ccfecf12af6ccebd2041a12ce1b843e4a769e200f5ef9.
Generated from declared public exports and source syntax. Signatures and annotations are declaration spellings; decorators, factories and annotations are never executed. Class members below are declared members; base classes remain explicit. Source docstrings describe their owning implementation; they do not grant app permissions.
Stable package-author facade for LSD profiling.
Package code should import this module instead of reaching into product internals. The
implementation is the stdlib-only :mod:`lsd_profiler` leaf, so importing this facade
does not construct an Engine, UI, worker, or sampler thread.
lsdtools.profiling.Level#
Kind: class. Source: core/profiler/src/lsd_profiler/levels.py:13.
Implementation alias: lsd_profiler.levels.Level.
Declared bases: IntEnum.
lsdtools.profiling.Level.OFF#
Kind: attribute. Source: core/profiler/src/lsd_profiler/levels.py:14.
OFF = 0
lsdtools.profiling.Level.LIGHT#
Kind: attribute. Source: core/profiler/src/lsd_profiler/levels.py:15.
LIGHT = 1
lsdtools.profiling.Level.DEEP#
Kind: attribute. Source: core/profiler/src/lsd_profiler/levels.py:16.
DEEP = 2
lsdtools.profiling.ProfilerLimits#
Kind: class. Source: core/profiler/src/lsd_profiler/profiler.py:49.
Source docstring:
Hard cardinality limits for one process-local capture.
Implementation alias: lsd_profiler.profiler.ProfilerLimits.
lsdtools.profiling.ProfilerLimits.spans#
Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:52.
spans: int
spans = _DEFAULT_MAX_SPANS
lsdtools.profiling.ProfilerLimits.counters#
Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:53.
counters: int
counters = _DEFAULT_MAX_COUNTERS
lsdtools.profiling.ProfilerLimits.active#
Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:54.
active: int
active = _DEFAULT_MAX_ACTIVE
lsdtools.profiling.ProfilerLimits.scopes#
Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:55.
scopes: int
scopes = _DEFAULT_MAX_SCOPES
lsdtools.profiling.ProfilerLimits.recent#
Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:56.
recent: int
recent = _DEFAULT_MAX_RECENT
lsdtools.profiling.ProfilerLimits.gauges#
Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:57.
gauges: int
gauges = _DEFAULT_MAX_GAUGES
lsdtools.profiling.configure#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:193.
configure(*, max_spans: Optional[int]=None, max_counters: Optional[int]=None, max_active: Optional[int]=None, max_scopes: Optional[int]=None, max_recent: Optional[int]=None, max_gauges: Optional[int]=None) -> ProfilerLimits
max_active: Optional[int]
max_counters: Optional[int]
max_gauges: Optional[int]
max_recent: Optional[int]
max_scopes: Optional[int]
max_spans: Optional[int]
Source docstring:
Configure strict process-local cardinality bounds.
Implementation alias: lsd_profiler.markers.configure.
lsdtools.profiling.count#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:178.
count(name: str, n: float=1.0) -> None
n: float
name: str
Implementation alias: lsd_profiler.markers.count.
lsdtools.profiling.gauge#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:183.
gauge(name: str, value: float) -> None
name: str
value: float
Implementation alias: lsd_profiler.markers.gauge.
lsdtools.profiling.get_level#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:217.
get_level() -> Level
Implementation alias: lsd_profiler.markers.get_level.
lsdtools.profiling.profile#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:85.
profile(name: str, /, **meta)
meta: (unannotated)
name: str
Source docstring:
Profile a generic scope. Returns a shared no-op handle while OFF.
Implementation alias: lsd_profiler.markers.profile.
lsdtools.profiling.profiled#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:150.
profiled(name=None, **meta)
meta: (unannotated)
name: (unannotated)
Source docstring:
Decorator form of :func:`profile`; supports sync and async functions.
Implementation alias: lsd_profiler.markers.profiled.
lsdtools.profiling.step#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:95.
step(name: str, /, **meta)
meta: (unannotated)
name: str
Source docstring:
Track a step nested inside a task and return an updateable context handle.
Implementation alias: lsd_profiler.markers.step.
lsdtools.profiling.stepped#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:160.
stepped(name=None, **meta)
meta: (unannotated)
name: (unannotated)
Source docstring:
Decorator form of :func:`step` for fixed-name/fixed-metadata execution stages.
Implementation alias: lsd_profiler.markers.stepped.
lsdtools.profiling.task#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:90.
task(name: str, /, **meta)
meta: (unannotated)
name: str
Source docstring:
Track one user-visible task and return an updateable context handle.
Implementation alias: lsd_profiler.markers.task.
lsdtools.profiling.tasked#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:155.
tasked(name=None, **meta)
meta: (unannotated)
name: (unannotated)
Source docstring:
Decorator form of :func:`task` for fixed-name/fixed-metadata public facades.
Implementation alias: lsd_profiler.markers.tasked.
lsdtools.profiling.worker#
Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:100.
worker(name: str, /, **meta)
meta: (unannotated)
name: str
Source docstring:
Track explicit worker ownership/lifetime in the current thread.
Implementation alias: lsd_profiler.markers.worker.