Skip to content

register_backend


function linescope.backends.base.register_backend(name, factory)[source]

Register a collector factory without changing the rendering pipeline.

Parameters

name : str

Unique name selected by the API or CLI.

factory : BackendFactory

Factory accepting accepts, on_source, memory, and root keywords. GPU requests additionally pass gpu=True to compatible collectors.

Implement ProfilerBackend to register a custom collector. Its result uses RawBackendResult and RawLine records before LineScope normalizes measurements for reporting.