simplebench.reporters.rich_table.reporter.config module🔗
Configuration for a RichTableReporter.
- class simplebench.reporters.rich_table.reporter.config.RichTableConfig(
- *,
- name: str | None = None,
- description: str | None = None,
- sections: set[Section] | None = None,
- targets: set[Target] | None = None,
- default_targets: set[Target] | None = None,
- formats: set[Format] | None = None,
- choices: ChoicesConf | None = None,
- file_suffix: str | None = None,
- file_unique: bool | None = None,
- file_append: bool | None = None,
- subdir: str | None = None,
Bases:
ReporterConfigConfiguration for a RichTableReporter.
This class inherits from
ReporterConfigand provides a type-safe, discoverable interface for overriding the default settings of aRichTableReporter.Initialize the RichTableReporter configuration.
Accepts keyword arguments to override any of the default configurations. All arguments are optional. If not provided, the default value for RichTableReporter will be used.
Note
The parameters of this constructor correspond directly to the parameters of the base
ReporterConfigclass. This design allows users to easily discover and override any configuration option available for the RichTableReporter while maintaining type safety and discoverability through IDEs and documentation tools.To prevent future breakage, avoid using the ‘rc_’, or ‘rich_table_’ prefixes for any new parameters in subclasses as these are reserved for use by SimpleBench.
Default Values:
name:
'rich-table'description:
'Displays benchmark results as a rich text table on the console.'sections:
{Section.OPS, Section.TIMING, Section.MEMORY, Section.PEAK_MEMORY}targets:
{Target.CONSOLE, Target.FILESYSTEM, Target.CALLBACK}default_targets:
{Target.CONSOLE}formats:
{Format.RICH_TEXT}choices: A
ChoicesConfwith predefinedChoiceConfobjects for rich table reporting.file_suffix:
'txt'file_unique:
Falsefile_append:
Truesubdir:
'rich'
- Parameters:
name – The name of the reporter.
description – A brief description of the reporter.
sections – The sections to include in the report.
targets – The output targets for the report.
default_targets – The default output targets if none are specified.
formats – The output formats for the report.
choices – The choice configurations for the reporter.
file_suffix – The file suffix to use for filesystem outputs.
file_unique – Whether to use unique filenames for outputs.
file_append – Whether to append to existing files.
subdir – The subdirectory to use for filesystem outputs.
- Raises:
SimpleBenchTypeError – If any provided argument has an invalid type.
SimpleBenchValueError – If any provided argument has an invalid value or combination of values.