Skip to content

Commit

Permalink
backfill old benchmark id with new runs
Browse files Browse the repository at this point in the history
  • Loading branch information
daroczig committed Sep 26, 2024
1 parent 7d06aaa commit 7794306
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion src/sc_crawler/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def inspect_server_benchmarks(server: "Server") -> List[dict]:
_log_cannot_load_benchmarks(server, framework, e, True)

framework = "stress_ng"
# TODO deprecate
try:
cores_per_path = {"stressng": server.vcpus, "stressngsinglecore": 1}
for cores_path in cores_per_path.keys():
Expand All @@ -310,7 +311,35 @@ def inspect_server_benchmarks(server: "Server") -> List[dict]:
}
)
except Exception as e:

Check failure on line 313 in src/sc_crawler/inspector.py

View workflow job for this annotation

GitHub Actions / build

Ruff (F841)

src/sc_crawler/inspector.py:313:25: F841 Local variable `e` is assigned to but never used
_log_cannot_load_benchmarks(server, framework, e, True)
# backfill with newer method - can be dropped once we deprecate stress_ng:cpu_all
try:
records = []
with open(
_server_framework_stdout_path(server, "stressngfull"), newline=""
) as f:
rows = csv.reader(f, quoting=csv.QUOTE_NONNUMERIC)
for row in rows:
records.append(row)
for i in [0, len(records) - 1]:
stressng_version = _server_framework_meta(server, "stressngfull")[
"version"
]
benchmarks.append(
{
**_benchmark_metafields(
server,
framework="stressngfull",
benchmark_id=":".join([framework, "cpu_all"]),
),
"config": {
"cores": records[i][0],
"framework_version": stressng_version,
},
"score": records[i][1],
}
)
except Exception as e:
_log_cannot_load_benchmarks(server, framework, e, True)

workload = "div16"
try:
Expand Down

0 comments on commit 7794306

Please sign in to comment.