@@ -170,20 +170,26 @@ def summarize_results(
170
170
return new_results
171
171
172
172
173
- def get_most_recent_pystats (results : Iterable [Result ]) -> Result | None :
174
- candidate_pystats = [
175
- result
176
- for result in results
177
- if result .result_info == ("pystats raw" , None , None )
178
- and result .fork == "python"
179
- and result .flags in (["PYTHON_UOPS" ], ["JIT" ])
180
- ]
181
- if len (candidate_pystats ):
182
- return sorted (
183
- candidate_pystats ,
184
- key = lambda x : (x .parsed_version , x .commit_datetime ),
185
- reverse = True ,
186
- )[0 ]
173
+ def get_most_recent_pystats (
174
+ results : Iterable [Result ],
175
+ ) -> Iterable [tuple [list [str ], Result ]]:
176
+ for flags in ([], ["PYTHON_UOPS" ], ["JIT" ]):
177
+ candidate_pystats = [
178
+ result
179
+ for result in results
180
+ if result .result_info == ("pystats raw" , None , None )
181
+ and result .fork == "python"
182
+ and result .flags == flags
183
+ ]
184
+ if len (candidate_pystats ):
185
+ yield (
186
+ flags ,
187
+ sorted (
188
+ candidate_pystats ,
189
+ key = lambda x : (x .parsed_version , x .commit_datetime ),
190
+ reverse = True ,
191
+ )[0 ],
192
+ )
187
193
188
194
189
195
def generate_index (
@@ -198,13 +204,14 @@ def generate_index(
198
204
"""
199
205
content = io .StringIO ()
200
206
201
- if ( most_recent_pystats := get_most_recent_pystats (all_results )) is not None :
207
+ for flags , result in get_most_recent_pystats (all_results ):
202
208
link = table .md_link (
203
- f"Most recent pystats on main ({ most_recent_pystats .cpython_hash } )" ,
204
- str (util .apply_suffix (most_recent_pystats .filename , ".md" )),
209
+ f"Most recent { ',' . join ( flags ) } pystats on main ({ result .cpython_hash } )" ,
210
+ str (util .apply_suffix (result .filename , ".md" )),
205
211
filename ,
206
212
)
207
- content .write (f"{ link } \n \n " )
213
+ content .write (f"- { link } \n " )
214
+ content .write ("\n " )
208
215
209
216
for runner , results in results_by_runner (benchmarking_results ):
210
217
content .write (f"## { runner } \n " )
0 commit comments