@@ -141,14 +141,16 @@ function print_header(ctx::TestIOContext, testgroupheader, workerheader)
141141 # header top
142142 printstyled (ctx. stdout , " " ^ (ctx. name_align + textwidth (testgroupheader) - 3 ), " │ " )
143143 printstyled (ctx. stdout , " Test |" , color = :white )
144- ctx. debug_timing && printstyled (ctx. stdout , " Init │ Compile │" , color = :white )
144+ ctx. debug_timing && printstyled (ctx. stdout , " Init │" , color = :white )
145+ VERSION >= v " 1.11" && ctx. debug_timing && printstyled (ctx. stdout , " Compile │" , color = :white )
145146 printstyled (ctx. stdout , " ──────────────── CPU ──────────────── │\n " , color = :white )
146147
147148 # header bottom
148149 printstyled (ctx. stdout , testgroupheader, color = :white )
149150 printstyled (ctx. stdout , lpad (workerheader, ctx. name_align - textwidth (testgroupheader) + 1 ), " │ " , color = :white )
150151 printstyled (ctx. stdout , " time (s) │" , color = :white )
151- ctx. debug_timing && printstyled (ctx. stdout , " time (s) │ (%) │" , color = :white )
152+ ctx. debug_timing && printstyled (ctx. stdout , " time (s) │" , color = :white )
153+ VERSION >= v " 1.11" && ctx. debug_timing && printstyled (ctx. stdout , " (%) │" , color = :white )
152154 printstyled (ctx. stdout , " GC (s) │ GC % │ Alloc (MB) │ RSS (MB) │\n " , color = :white )
153155 flush (ctx. stdout )
154156 finally
@@ -185,8 +187,10 @@ function print_test_finished(record::TestRecord, wrkr, test, ctx::TestIOContext)
185187 printstyled (ctx. stdout , lpad (init_time_str, ctx. elapsed_align, " " ), " │ " , color = :white )
186188
187189 # compilation time
188- init_time_str = @sprintf (" %7.2f" , Float64 (100 * record. compile_time/ time))
189- printstyled (ctx. stdout , lpad (init_time_str, ctx. compile_align, " " ), " │ " , color = :white )
190+ if VERSION >= v " 1.11"
191+ init_time_str = @sprintf (" %7.2f" , Float64 (100 * record. compile_time/ time))
192+ printstyled (ctx. stdout , lpad (init_time_str, ctx. compile_align, " " ), " │ " , color = :white )
193+ end
190194 end
191195
192196 gc_str = @sprintf (" %5.2f" , record. gctime)
@@ -328,7 +332,9 @@ function runtest(f, name, init_code, start_time)
328332 $ f
329333 end
330334 end
331- (; testset= stats. value, stats. time, stats. bytes, stats. gctime, stats. compile_time)
335+
336+ compile_time = @static VERSION >= v " 1.11" ? stats. compile_time : 0.0
337+ (; testset= stats. value, stats. time, stats. bytes, stats. gctime, compile_time)
332338 end
333339
334340 # process results
0 commit comments