Skip to content

Result Classes

result

Created on Jan 19, 2010

@author: Roland Kaminski

Benchmark dataclass

Represents a benchmark, i.e., a set of instances.

Attributes: name (str): The name of the benchmark. classes (dict[int, Class]): Benchmark classes in this benchmark.

__iter__() -> Iterator[Class]

Creates an iterator over all benchmark classes.

BenchmarkMerge

Represents an (ordered) set of benchmark sets.

__init__(benchmarks: set[Benchmark], class_group_depth: Optional[int] = None)

Initializes using the given set of benchmarks.

Attributes: benchmarks (set[Benchmark]): Benchmarks to merge. class_group_depth (Optional[int]): Directory depth for reporting classes, or None to retain classes.

__iter__() -> Iterator[Class]

Creates an interator over all benchmark classes in all benchmarks.

group_runspec(runspec: Runspec) -> Runspec

Return a reporting view without changing original class or instance identities.

Attributes: runspec (Runspec): The runspec to group.

Class dataclass

Represents a benchmark class.

Attributes: benchmark (Benchmark): The benchmark associaed with this class. name (str): The name of the benchmark. id (int): A unique id (in the scope of the benchmark). instances (dict[int, Instance]): Instances belonging to this benchmark class. values (dict[str, Any]): Mutable dict with helper values.

__iter__() -> Iterator[Instance]

Creates an iterator over all instances in the benchmark class.

__post_init__() -> None

Initialize mutable helper variables.

ClassResult dataclass

Represents the results of all instances of a benchmark class.

Attributes: benchclass (Class): The benchmark class for the results. instresults (list[InstanceResult]): Results of instances belonging to the benchmark class.

__iter__() -> Iterator[InstanceResult]

Creates an iterator over all the individual results per instance.

Config dataclass

Represents a config.

Attributes: name (str): The name of the config. template (str): A path to the template file.

DistJob dataclass

Bases: Job

Represents a distributed job.

Attributes: name (str): The name of the job. timeout (int): Timeout of the job. runs (int): Number of repetitions per instance. attr (dict[str, Any]): Arbitrary extra arguments. script_mode (str): Specifies the script generation mode. walltime (str): The walltime for a distributed job. cpt (int): The number of cpus per task. partition (str): The partition to run the job on.

Instance dataclass

Represents a benchmark instance.

Attributes: benchclass (Class): The class of the instance. name (str): The name of the benchmark. id (int): A unique id (in the scope of the benchmark). max_runs (int): Max number of runs. cmdline (dict[str, str]): Command line parameters. values (dict[str, Any]): Mutable dict with helper values.

__post_init__() -> None

Initialize mutable helper variables.

InstanceResult dataclass

Represents the result of an individual instance (with possibly multiple runs).

Attributes: instance (Instance): The instance for the results. runs (list[Run]): Results of runs belonging to the instance.

__iter__() -> Iterator[Run]

Creates an iterator over the result of all runs.

Job dataclass

Represents a job.

Attributes: name (str): The name of the job. timeout (int): Timeout of the job. runs (int): Number of repetitions per instance. attr (dict[str, Any]): Arbitrary extra arguments. memout (int): Memory limit for the job. template_options (str): Additional options for the job template.

Machine dataclass

Represents a machine.

Attributes: name (str): The name of the machine. cpu (str): String describing the CPU. memory (str): String describing the Memory.

Project dataclass

Describes a project, i.e, a collection of run specifications.

Attributes: name (str): The name of the project. job (str): The name of the associated job. runspecs (list['Runspec']): Run specifications of the project.

__iter__() -> Iterator[Runspec]

Creates an iterator over all run specification in the project.

Result

Stores the benchmark description and its results.

__init__() -> None

Initializes an empty result.

gen_spreadsheet(out: str, sel_projects: set[str], measures: dict[str, Any], export: bool = False, max_col_width: int = 300, charts: bool = True, class_group_depth: Optional[int] = None) -> Optional[str]

Prints the current result in Microsoft Excel Spreadsheet format (XLSX). Returns the name of the export file if values are exported.

Attributes: out (str): The output file to write to. sel_projects (set[str]): The selected projects ("" for all). measures (dict[str, Any]): The measures to extract. export (bool): Whether to export the raw values as parquet file. max_col_width (int): The maximum column width for spreadsheet. charts (bool): Whether to add charts to the spreadsheet. class_group_depth (Optional[int]): Directory depth for reporting classes, or None to retain classes.

merge(projects: list[Project], class_group_depth: Optional[int] = None) -> BenchmarkMerge

Concatenates the benchmarks in the given projects into one benchmark set.

Attributes: projects (list[Project]): The projects to merge with. class_group_depth (Optional[int]): Directory depth for reporting classes, or None to retain classes.

Run dataclass

Represents the result of an individual run of a benchmark instance.

Attributes: instresult (InstanceResult): The associated instance result. number (int): The number of the run. measures (dict[str, tuple[str, str]]): Concrete measurements.

iter(measures: dict[str, Any]) -> Iterator[tuple[str, str, str]]

Creates an iterator over all measures captured during the run. Measures can be filter by giving a string set of measure names. If this string set is empty, instead all measures sorted by their keys will be returned.

Attributes: measures (dict[str, Any]): Selected measures.

Runspec dataclass

Describes a run specification, i.e, how to run individual systems on a set of instances.

Attributes: system (System): The system to evaluate. machine (Machine): The machine to run on. benchmark (Benchmark): The benchmark set to evaluate. setting (Setting): The setting to run with. classresults (list[ClassResult]): The benchmark results.

__iter__() -> Iterator[ClassResult]

Creates an iterator over all results (grouped by benchmark class.)

SeqJob dataclass

Bases: Job

Represents a sequential job.

Attributes: name (str): The name of the job. timeout (int): Timeout of the job. runs (int): Number of repetitions per instance. attr (dict[str, Any]): Arbitrary extra arguments. parallel (int): Number of processes to start in parallel.

Setting dataclass

Represents a setting.

Attributes: system (System): The system associated with the setting. name (str): The name of the setting. cmdline (dict[str, str]): Command line parameters. tag (str): Tags of the setting. order (int): An integer denoting the occurrence in the XML file. dist_template (str): A path to the template file for distributed jobs. attr (dict[str, Any]): Arbitrary extra arguments. dist_options (str): Additional options for distributed jobs. encodings (dict[str, set[str]]): Mapping from encoding tags to sets of encoding files.

System dataclass

Represents a system.

Attributes: name (str): The name of the system. version (str): The version. measures (str): The measurement function (a string). order (int): An integer denoting the occurrence in the XML file. config (Config): The system configuration. cmdline (dict[str, str]): Command line parameters. settings (dict[str, Setting]): Dictionary of all system settings.