ODS Gen¶
Created on Apr 14, 2025
@author: Tom Schmidt
Formula
¶
Bases: Formula
Extending odswriter.Formula class with the ability to handle sheet references and some minor fixes.
__str__() -> str
¶
Get ods string representation.
ODSDoc
¶
Sheet
¶
Class representing an ODS sheet.
__init__(benchmark: result.BenchmarkMerge, measures: list[tuple[str, Any]], name: str, ref_sheet: Optional[Sheet] = None)
¶
add_benchclass_summary(block: SystemBlock, benchclass_result: result.ClassResult, benchclass_summary: dict[str, Any]) -> None
¶
Add benchmark class summary to SystemBlock.
Attributes:
Name | Type | Description |
---|---|---|
block |
SystemBlock
|
SystemBlock to which summary is added. |
benchclass_result |
ClassResult
|
ClassResult. |
benchclass_summary |
dict[str, Any]
|
Summary of benchmark class. |
add_col_summary() -> None
¶
Add column summary if applicable to column type.
add_instance_results(block: SystemBlock, instance_result: result.InstanceResult, benchclass_summary: dict[str, Any]) -> None
¶
Add instance results to SystemBlock and add values to summary if necessary.
Attributes:
Name | Type | Description |
---|---|---|
block |
SystemBlock
|
SystemBlock to which results are added. |
instance_result |
InstanceResult
|
InstanceResult. |
benchclass_summary |
dict[str, Any]
|
Summary of benchmark class. |
add_row_summary(float_occur: dict[str, set[Any]], offset: int) -> None
¶
add_runspec(runspec: result.Runspec) -> None
¶
Add results to the their respective blocks.
Attributes:
Name | Type | Description |
---|---|---|
runspec |
Runspec
|
Run specification |
add_styles(float_occur: dict[str, Any]) -> None
¶
finish() -> None
¶
Finish ODS content.
SystemBlock
dataclass
¶
Dataframe containing results for system.
Attributes:
Name | Type | Description |
---|---|---|
setting |
Optional[Setting]
|
Benchmark setting. |
machine |
Optional[Machine]
|
Machine. |
content |
DataFrame
|
Results. |
columns |
dict[str, Any]
|
Dictionary of columns and their types. |
offset |
Optional[int]
|
Offset for final block position. |
add_cell(row: int, name: str, value_type: str, value: Any) -> None
¶
get_cell_index(col: int, row: int, abs_col: bool = False, abs_row: bool = False) -> str
¶
try_float(v: Any) -> Any
¶
Try to cast given value to float. Return input if not possible.
Attributes:
Name | Type | Description |
---|---|---|
v |
Any
|
Value tried to be cast to float. |
write_row(self: ods.Sheet, cells: list[Any]) -> None
¶
Method to write ods row. Replaces ods.Sheet.writerow