Skip to content

Commit faaaab7

Browse files
authored
Merge pull request #312 from faster-cpython/fix-latest-pystats
Fix determination of latest pystats
2 parents 5adb08c + 37408af commit faaaab7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

bench_runner/result.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def _generate_contents(self) -> str:
148148
)
149149
fd.write("\n")
150150
fd.write(
151-
f"- Geometric mean (including insignificant results): {self._calculate_geometric_mean()}"
151+
"- Geometric mean (including insignificant results): "
152+
f"{self._calculate_geometric_mean()}"
152153
)
153154
fd.write("\n\n")
154155
fd.write(hpt.make_report(self.ref.filename, self.head.filename))

bench_runner/scripts/generate_results.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ def get_most_recent_pystats(results: Iterable[Result]) -> Result | None:
176176
for result in results
177177
if result.result_info == ("pystats raw", None, None)
178178
and result.fork == "python"
179-
and result.flags == ["PYTHON_UOPS"]
179+
and result.flags in (["PYTHON_UOPS"], ["JIT"])
180180
]
181181
if len(candidate_pystats):
182182
return sorted(
183183
candidate_pystats,
184-
key=lambda x: x.commit_datetime,
184+
key=lambda x: (x.parsed_version, x.commit_datetime),
185185
reverse=True,
186186
)[0]
187187

0 commit comments

Comments
 (0)