Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/imgtests/exec/loaders/kirk.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
logger = logging.getLogger(__name__)

DEFAULT_LTP_RESULTS_DIR = Path("/var/tmp/ltp-results") # noqa: S108
TEST_SKIPPED_RETURN_CODE = "32"


class Kirk(GenericUtil):
Expand Down Expand Up @@ -283,10 +284,12 @@ def split_result(
"duration": test.get("test", {}).get("duration", 0.0),
}
for test in results
if test.get("test", {}).get("retval", []) != [TEST_SKIPPED_RETURN_CODE]
]
metrics = {str(i): metric for i, metric in enumerate(metrics)}

summary = raw_metrics.get("stats", {})
test_type = {"type": "general"}
time = {
"duration_sec": round(summary.get("runtime", 0.0), 2),
}
Expand All @@ -296,7 +299,7 @@ def split_result(

return AdapterResult(
tool="kirk",
test_type={},
test_type=test_type,
time=time,
metrics=metrics,
)
3 changes: 3 additions & 0 deletions src/imgtests/reporting/html_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class DiagramConfig(NamedTuple):
TOOLS_TO_SUBSYSTEMS: dict[str, Subsystem] = {
"iperf3": Subsystem.NETWORK,
"fio": Subsystem.FILE,
"kirk": Subsystem.SYSTEM,
}


Expand Down Expand Up @@ -324,6 +325,8 @@ def _extract_metrics_from_experiment(self, experiment: ExperimentBase) -> list[M
fixed_prefix = [tool, test_type["identifier"]]
case "perf":
fixed_prefix = [tool, test_type["benchmark"]]
case "kirk":
fixed_prefix = [tool, test_type["type"]]
case _:
fixed_prefix = [tool]

Expand Down
4 changes: 3 additions & 1 deletion tests/unit/imgtests/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,9 @@ def test_pts_parse_metrics(raw_metrics: dict[str, Any], expected: dict[str, Any]
},
{
"tool": "kirk",
"test_type": {},
"test_type": {
"type": "general",
},
"time": {
"duration_sec": 2.30,
},
Expand Down
Loading