bencher.plotting.plot_filter

Module Contents

Classes

VarRange

A VarRange represents the bounded and unbounded ranges of integers. This class is used to define filters for various variable types. For example by defining cat_var = VarRange(0,0), calling matches(0) will return true, but any other integer will not match. You can also have unbounded ranges for example VarRange(2,None) will match to 2,3,4... up to infinity. for By default the lower and upper bounds are set to -1 so so that no matter what value is passsed to matches() will return false. Matches only takes 0 and positive integers.

PlotFilter

A class for representing the types of results a plot is able to represent.

PlotMatchesResult

Stores information about which properites match the requirements of a particular plotter

class bencher.plotting.plot_filter.VarRange(lower_bound: int = 0, upper_bound: int = -1)

A VarRange represents the bounded and unbounded ranges of integers. This class is used to define filters for various variable types. For example by defining cat_var = VarRange(0,0), calling matches(0) will return true, but any other integer will not match. You can also have unbounded ranges for example VarRange(2,None) will match to 2,3,4… up to infinity. for By default the lower and upper bounds are set to -1 so so that no matter what value is passsed to matches() will return false. Matches only takes 0 and positive integers.

matches(val: int) bool

Checks that a value is within the variable range. lower_bound and upper_bound are inclusive (lower_bound<=val<=upper_bound )

Parameters:

val (int) – A positive integer representing a number of items

Returns:

True if the items is within the range, False otherwise.

Return type:

bool

Raises:

ValueError – If val < 0

matches_info(val, name)
__str__() str

Return str(self).

class bencher.plotting.plot_filter.PlotFilter

A class for representing the types of results a plot is able to represent.

float_range: VarRange
cat_range: VarRange
vector_len: VarRange
result_vars: VarRange
panel_range: VarRange
repeats_range: VarRange
input_range: VarRange
matches_result(plt_cnt_cfg: bencher.plotting.plt_cnt_cfg.PltCntCfg, plot_name: str) PlotMatchesResult

Checks if the result data signature matches the type of data the plot is able to display.

class bencher.plotting.plot_filter.PlotMatchesResult(plot_filter: PlotFilter, plt_cnt_cfg: bencher.plotting.plt_cnt_cfg.PltCntCfg, plot_name: str)

Stores information about which properites match the requirements of a particular plotter

to_panel(**kwargs) panel.pane.Markdown | None