simplebench.reporters.rich_table.reporter.options.options module🔗
Reporter for benchmark results using Rich tables on the console.
- class simplebench.reporters.rich_table.reporter.options.options.RichTableOptions(
- virtual_width: int | None = None,
- fields: Sequence[RichTableField] | None = None,
- variation_cols_last: bool = False,
Bases:
ReporterOptionsClass for holding Rich table reporter specific options in a Choice.
This class provides additional configuration options specific to the JSON reporter. It is accessed via the
optionsattribute of aChoiceinstance.- Parameters:
virtual_width –
The width of the Rich table output in characters when rendered to the filesystem or via callback. Must be between 80 and 1000 characters or
None. IfNone, no width constraint is applied.The virtual width is used to determine how the table should be formatted when rendered to non-console outputs, such as files or callbacks. This allows for better control over the appearance of the table in different contexts.
fields –
A tuple of Rich Table fields to include in the output. If none is specifically set, a predefined set of fields is used. The fields appear in the order specified in the sequence.
If specified, all fields must be from the
RichTableFieldenum.The default fields, in order, are:
variation_cols_last – Whether to place the variation columns (if any) at the end of the rows. Defaults to
False- which places the variation columns at the start of the rows.
- Raises:
SimpleBenchTypeError – If any parameter is of an invalid type.
SimpleBenchValueError – If
virtual_widthis not between 80 and 10000 characters when specified or iffieldsis an empty sequence.
Initialize RichTableOptions instance.
- property fields: tuple[RichTableField, ...]🔗
Return the fields, in order, to include in the Rich table when rendering.
- Returns:
A tuple of RichTableField enums representing the default fields.