bencher.results.histogram_result

Classes

HistogramResult

Module Contents

class bencher.results.histogram_result.HistogramResult(bench_cfg: bencher.bench_cfg.BenchCfg)

Bases: bencher.results.holoview_results.holoview_result.HoloviewResult

to_plot(result_var: param.Parameter | None = None, target_dimension: int = 2, **kwargs) panel.pane.Pane | None

Generates a histogram plot from benchmark data.

This method applies filters to ensure the data is appropriate for a histogram and then passes the filtered data to to_histogram_ds for rendering.

Parameters:
  • result_var (Parameter, optional) – The result variable to plot. If None, uses the default.

  • target_dimension (int, optional) – The target dimensionality for data filtering. Defaults to 2.

  • **kwargs – Additional keyword arguments passed to the plot rendering.

Returns:

A panel containing the histogram if data is appropriate,

otherwise returns filter match results.

Return type:

pn.pane.Pane | None

_make_histogram(dataset: xarray.Dataset, result_var: param.Parameter, **kwargs)

Render a single histogram from a dataset (no over_time handling).

to_histogram_ds(dataset: xarray.Dataset, result_var: param.Parameter, **kwargs)

Creates a histogram from the provided dataset.

Given a filtered dataset, this method generates a histogram visualization showing the distribution of values for the result variable. When over_time is active with multiple time points, produces per-time-point and pooled-aggregate tabs.

Parameters:
  • dataset (xr.Dataset) – The dataset containing benchmark results.

  • result_var (Parameter) – The result variable to plot in the histogram.

  • **kwargs – Additional keyword arguments passed to the histogram plot options.

Returns:

A histogram visualization of the benchmark data distribution.

Return type:

hvplot.element.Histogram