Skip to content

Commit a8ca44f

Browse files
committed
better it for GC, skip time just percentage
1 parent dd60724 commit a8ca44f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/execution.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -587,14 +587,16 @@ macro btime(args...)
587587
$print(" min ", $BenchmarkTools.prettytime($BenchmarkTools.time($trialmin)),
588588
", mean ", $BenchmarkTools.prettytime($BenchmarkTools.time($trialmean)),
589589
" (", $trialallocs , " allocation", $trialallocs == 1 ? "" : "s")
590-
if $trialallocs == 0
591-
$println(")")
592-
else
593-
$println(", ", $prettymemory($memory($trialmin)),
594-
". GC mean ", $prettytime($gctime($trialmean); short=true),
595-
", ", $prettypercent($gctime($trialmean) / $time($trialmean)), ")"
590+
if $trialallocs != 0
591+
$print(", ", $prettymemory($memory($trialmin)))
592+
end
593+
if $gctime($trialmean) != 0
594+
$print(". GC mean ",
595+
# $prettytime($gctime($trialmean); short=true), ", ",
596+
$prettypercent($gctime($trialmean) / $time($trialmean)),
596597
)
597598
end
599+
$println(")")
598600
$result
599601
end)
600602
end

0 commit comments

Comments
 (0)