@@ -262,12 +262,12 @@ function prettymemory(b)
262
262
return string (@sprintf (" %.2f" , value), " " , units)
263
263
end
264
264
265
- Base. show (io:: IO , t:: Trial ) = print (io, " Trial(" , prettytime (time (t)), " )" )
266
- Base. show (io:: IO , t:: TrialEstimate ) = print (io, " TrialEstimate(" , prettytime (time (t)), " )" )
267
- Base. show (io:: IO , t:: TrialRatio ) = print (io, " TrialRatio(" , prettypercent (time (t)), " )" )
268
- Base. show (io:: IO , t:: TrialJudgement ) = print (io, " TrialJudgement(" , prettydiff (time (ratio (t))), " => " , time (t), " )" )
265
+ Base. summary (io:: IO , t:: Trial ) = print (io, " Trial(" , prettytime (time (t)), " )" )
266
+ Base. summary (io:: IO , t:: TrialEstimate ) = print (io, " TrialEstimate(" , prettytime (time (t)), " )" )
267
+ Base. summary (io:: IO , t:: TrialRatio ) = print (io, " TrialRatio(" , prettypercent (time (t)), " )" )
268
+ Base. summary (io:: IO , t:: TrialJudgement ) = print (io, " TrialJudgement(" , prettydiff (time (ratio (t))), " => " , time (t), " )" )
269
269
270
- function Base. show (io:: IO , :: MIME"text/plain" , t:: Trial )
270
+ function Base. show (io:: IO , t:: Trial )
271
271
if length (t) > 0
272
272
min = minimum (t)
273
273
max = maximum (t)
@@ -288,36 +288,40 @@ function Base.show(io::IO, ::MIME"text/plain", t::Trial)
288
288
meanstr = " N/A"
289
289
end
290
290
println (io, " BenchmarkTools.Trial: " )
291
- println (io, " memory estimate: " , memorystr)
292
- println (io, " allocs estimate: " , allocsstr)
293
- println (io, " --------------" )
294
- println (io, " minimum time: " , minstr)
295
- println (io, " median time: " , medstr)
296
- println (io, " mean time: " , meanstr)
297
- println (io, " maximum time: " , maxstr)
298
- println (io, " --------------" )
299
- println (io, " samples: " , length (t))
300
- print (io, " evals/sample: " , t. params. evals)
291
+ pad = get (io, :pad , " " )
292
+ println (io, pad, " memory estimate: " , memorystr)
293
+ println (io, pad, " allocs estimate: " , allocsstr)
294
+ println (io, pad, " --------------" )
295
+ println (io, pad, " minimum time: " , minstr)
296
+ println (io, pad, " median time: " , medstr)
297
+ println (io, pad, " mean time: " , meanstr)
298
+ println (io, pad, " maximum time: " , maxstr)
299
+ println (io, pad, " --------------" )
300
+ println (io, pad, " samples: " , length (t))
301
+ print (io, pad, " evals/sample: " , t. params. evals)
301
302
end
302
303
303
- function Base. show (io:: IO , :: MIME"text/plain" , t:: TrialEstimate )
304
+ function Base. show (io:: IO , t:: TrialEstimate )
304
305
println (io, " BenchmarkTools.TrialEstimate: " )
305
- println (io, " time: " , prettytime (time (t)))
306
- println (io, " gctime: " , prettytime (gctime (t)), " (" , prettypercent (gctime (t) / time (t))," )" )
307
- println (io, " memory: " , prettymemory (memory (t)))
308
- print (io, " allocs: " , allocs (t))
306
+ pad = get (io, :pad , " " )
307
+ println (io, pad, " time: " , prettytime (time (t)))
308
+ println (io, pad, " gctime: " , prettytime (gctime (t)), " (" , prettypercent (gctime (t) / time (t))," )" )
309
+ println (io, pad, " memory: " , prettymemory (memory (t)))
310
+ print (io, pad, " allocs: " , allocs (t))
309
311
end
310
312
311
- function Base. show (io:: IO , :: MIME"text/plain" , t:: TrialRatio )
313
+ function Base. show (io:: IO , t:: TrialRatio )
312
314
println (io, " BenchmarkTools.TrialRatio: " )
313
- println (io, " time: " , time (t))
314
- println (io, " gctime: " , gctime (t))
315
- println (io, " memory: " , memory (t))
316
- print (io, " allocs: " , allocs (t))
315
+ pad = get (io, :pad , " " )
316
+ println (io, pad, " time: " , time (t))
317
+ println (io, pad, " gctime: " , gctime (t))
318
+ println (io, pad, " memory: " , memory (t))
319
+ print (io, pad, " allocs: " , allocs (t))
317
320
end
318
321
319
- function Base. show (io:: IO , :: MIME"text/plain" , t:: TrialJudgement )
322
+ function Base. show (io:: IO , t:: TrialJudgement )
320
323
println (io, " BenchmarkTools.TrialJudgement: " )
321
- println (io, " time: " , prettydiff (time (ratio (t))), " => " , time (t), " (" , prettypercent (params (t). time_tolerance), " tolerance)" )
322
- print (io, " memory: " , prettydiff (memory (ratio (t))), " => " , memory (t), " (" , prettypercent (params (t). memory_tolerance), " tolerance)" )
324
+ pad = get (io, :pad , " " )
325
+ println (io, pad, " time: " , prettydiff (time (ratio (t))), " => " , time (t), " (" , prettypercent (params (t). time_tolerance), " tolerance)" )
326
+ print (io, pad, " memory: " , prettydiff (memory (ratio (t))), " => " , memory (t), " (" , prettypercent (params (t). memory_tolerance), " tolerance)" )
323
327
end
0 commit comments