20
20
from bench_runner import git
21
21
from bench_runner .result import has_result
22
22
from bench_runner import util
23
- from bench_runner .util import PathLike
23
+ from bench_runner .util import log_group , PathLike
24
24
25
25
26
26
from bench_runner .scripts import run_benchmarks as mrun_benchmarks
@@ -266,26 +266,33 @@ def _main(
266
266
if pystats and platform != "linux" :
267
267
raise RuntimeError ("Pystats is only supported on Linux" )
268
268
269
- checkout_cpython (fork , ref , cpython )
269
+ with log_group ("Checking out CPython" ):
270
+ checkout_cpython (fork , ref , cpython )
270
271
271
- if not should_run (force , fork , ref , machine , False , flags , cpython = cpython ):
272
- print ("No need to run benchmarks. Skipping..." )
273
- return
272
+ with log_group ("Determining if we need to run benchmarks" ):
273
+ if not should_run (force , fork , ref , machine , False , flags , cpython = cpython ):
274
+ print ("No need to run benchmarks. Skipping..." )
275
+ return
274
276
275
- checkout_benchmarks ()
277
+ with log_group ("Checking out benchmarks" ):
278
+ checkout_benchmarks ()
276
279
277
- match platform :
278
- case "linux" | "macos" :
279
- compile_unix (cpython , flags , pgo , pystats )
280
- case "windows" :
281
- compile_windows (cpython , flags , pgo , force_32bit )
280
+ with log_group ("Compiling CPython" ):
281
+ match platform :
282
+ case "linux" | "macos" :
283
+ compile_unix (cpython , flags , pgo , pystats )
284
+ case "windows" :
285
+ compile_windows (cpython , flags , pgo , force_32bit )
282
286
283
- # Print out the version of Python we built just so we can confirm it's the
284
- # right thing in the logs
285
- subprocess .check_call ([get_exe_path (cpython , flags , force_32bit ), "-VV" ])
287
+ # Print out the version of Python we built just so we can confirm it's the
288
+ # right thing in the logs
289
+ subprocess .check_call ([get_exe_path (cpython , flags , force_32bit ), "-VV" ])
286
290
287
- install_pyperformance (venv )
288
- tune_system (venv , perf )
291
+ with log_group ("Installing pyperformance" ):
292
+ install_pyperformance (venv )
293
+
294
+ with log_group ("Tuning system" ):
295
+ tune_system (venv , perf )
289
296
290
297
try :
291
298
if Path (".debug" ).exists ():
@@ -303,17 +310,18 @@ def _main(
303
310
else :
304
311
mode = "benchmark"
305
312
306
- mrun_benchmarks ._main (
307
- mode ,
308
- get_exe_path (cpython , flags , force_32bit ),
309
- fork ,
310
- ref ,
311
- benchmarks ,
312
- flags = flags ,
313
- run_id = run_id ,
314
- test_mode = False ,
315
- individual = pystats ,
316
- )
313
+ with log_group ("Running benchmarks" ):
314
+ mrun_benchmarks ._main (
315
+ mode ,
316
+ get_exe_path (cpython , flags , force_32bit ),
317
+ fork ,
318
+ ref ,
319
+ benchmarks ,
320
+ flags = flags ,
321
+ run_id = run_id ,
322
+ test_mode = False ,
323
+ individual = pystats ,
324
+ )
317
325
finally :
318
326
reset_system (venv )
319
327
0 commit comments