bencher.plugins.builtins
Built-in chart types wrapped as plot plugins (A1 Phase 2).
Each wrapper delegates to the existing renderer method on the live BenchResult
(carried in BenchData.legacy_result), so renderer logic is unchanged — this
phase only moves dispatch onto the plugin registry. The registry-level match
rule is permissive (PlotFilter.match_all()) because today’s renderers build
their shape filters dynamically inside to_plot (scenario lists, over_time
special cases) and return None on mismatch; centralizing those filters into
declarative signatures is the plot-selection redesign (A2), not this phase.
Priorities encode the legacy default_plot_callbacks() ordering so reports
render plots in exactly the same order as before.
Attributes
Classes
Thin plugin adapter over a legacy |
Functions
|
The keyword names a fixed-signature callback accepts, or None when it takes |
|
(name, backend, callback) for the default chart set, in legacy order. |
|
(name, backend, callback) for chart types that are never auto-selected but can |
|
Register the default chart set with the global registry. Idempotent. |
Module Contents
- class bencher.plugins.builtins.LegacyResultPlugin
Thin plugin adapter over a legacy
BenchResultrenderer method.- name: str
- backend: str
- priority: int
- requires: frozenset[str]
- callback: Callable
- auto: bool = True
- render(data: bencher.plugins.bench_data.BenchData) panel.viewable.Viewable | None
- bencher.plugins.builtins._declared_kwargs(callback: Callable) frozenset[str] | None
The keyword names a fixed-signature callback accepts, or None when it takes **kwargs or its signature cannot be introspected (no filtering in either case). Deliberately uncached: an lru_cache here would pin every callback — including per-run closures and bound methods with their captured data — for process lifetime, and would crash on unhashable callables.
- bencher.plugins.builtins._builtin_specs() list[tuple[str, str, Callable]]
(name, backend, callback) for the default chart set, in legacy order.
- bencher.plugins.builtins._named_only_specs() list[tuple[str, str, Callable]]
(name, backend, callback) for chart types that are never auto-selected but can be requested by name in
plot_list(A1 Phase 3). Plotly appears only where a plot already required it (surface, like volume above); rerun is its own backend and imports the rerun SDK lazily inside the renderer, so registration is safe without the package installed.
- bencher.plugins.builtins.PANES_PLUGIN_NAME = 'panes'
- bencher.plugins.builtins.CALLBACK_TO_PLUGIN: dict[Callable, str]
- bencher.plugins.builtins.register_builtin_plugins() None
Register the default chart set with the global registry. Idempotent.