All docs
Docs/ API Reference/ lsdtools.profiling reference
API Reference

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.

text
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.

Python
OFF = 0

lsdtools.profiling.Level.LIGHT#

Kind: attribute. Source: core/profiler/src/lsd_profiler/levels.py:15.

Python
LIGHT = 1

lsdtools.profiling.Level.DEEP#

Kind: attribute. Source: core/profiler/src/lsd_profiler/levels.py:16.

Python
DEEP = 2

lsdtools.profiling.ProfilerLimits#

Kind: class. Source: core/profiler/src/lsd_profiler/profiler.py:49.

Source docstring:

text
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.

Python
spans: int
Python
spans = _DEFAULT_MAX_SPANS

lsdtools.profiling.ProfilerLimits.counters#

Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:53.

Python
counters: int
Python
counters = _DEFAULT_MAX_COUNTERS

lsdtools.profiling.ProfilerLimits.active#

Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:54.

Python
active: int
Python
active = _DEFAULT_MAX_ACTIVE

lsdtools.profiling.ProfilerLimits.scopes#

Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:55.

Python
scopes: int
Python
scopes = _DEFAULT_MAX_SCOPES

lsdtools.profiling.ProfilerLimits.recent#

Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:56.

Python
recent: int
Python
recent = _DEFAULT_MAX_RECENT

lsdtools.profiling.ProfilerLimits.gauges#

Kind: attribute. Source: core/profiler/src/lsd_profiler/profiler.py:57.

Python
gauges: int
Python
gauges = _DEFAULT_MAX_GAUGES

lsdtools.profiling.configure#

Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:193.

Python
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
Python
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:

text
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.

Python
count(name: str, n: float=1.0) -> None
Python
n: float
name: str

Implementation alias: lsd_profiler.markers.count.

lsdtools.profiling.gauge#

Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:183.

Python
gauge(name: str, value: float) -> None
Python
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.

Python
get_level() -> Level

Implementation alias: lsd_profiler.markers.get_level.

lsdtools.profiling.profile#

Kind: function. Source: core/profiler/src/lsd_profiler/markers.py:85.

Python
profile(name: str, /, **meta)
Python
meta: (unannotated)
name: str

Source docstring:

text
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.

Python
profiled(name=None, **meta)
Python
meta: (unannotated)
name: (unannotated)

Source docstring:

text
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.

Python
step(name: str, /, **meta)
Python
meta: (unannotated)
name: str

Source docstring:

text
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.

Python
stepped(name=None, **meta)
Python
meta: (unannotated)
name: (unannotated)

Source docstring:

text
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.

Python
task(name: str, /, **meta)
Python
meta: (unannotated)
name: str

Source docstring:

text
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.

Python
tasked(name=None, **meta)
Python
meta: (unannotated)
name: (unannotated)

Source docstring:

text
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.

Python
worker(name: str, /, **meta)
Python
meta: (unannotated)
name: str

Source docstring:

text
Track explicit worker ownership/lifetime in the current thread.

Implementation alias: lsd_profiler.markers.worker.

By LSD Team · Last updated Sep 09, 2026 Ask a question View as Markdown
Type to search every doc, guide, and tutorial.
↑↓ navigate openesc close