Skip to content

Commit dceeafe

Browse files
InteractiveUtils: avoid side-effect compilation in first @time_imports print (#52832)
1 parent b4d857b commit dceeafe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/loading.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,13 +1212,13 @@ function run_module_init(mod::Module, i::Int=1)
12121212
cumulative_compile_timing(false);
12131213
comp_time, recomp_time = (cumulative_compile_time_ns() .- compile_elapsedtimes) ./ 1e6
12141214

1215-
print(round(elapsedtime, digits=1), " ms $mod.__init__() ")
1215+
print("$(round(elapsedtime, digits=1)) ms $mod.__init__() ")
12161216
if comp_time > 0
12171217
printstyled(Ryu.writefixed(Float64(100 * comp_time / elapsedtime), 2), "% compilation time", color = Base.info_color())
12181218
end
12191219
if recomp_time > 0
12201220
perc = Float64(100 * recomp_time / comp_time)
1221-
printstyled(" (", perc < 1 ? "<1" : Ryu.writefixed(perc, 0), "% recompilation)", color = Base.warn_color())
1221+
printstyled(" ($(perc < 1 ? "<1" : Ryu.writefixed(perc, 0))% recompilation)", color = Base.warn_color())
12221222
end
12231223
println()
12241224
end

0 commit comments

Comments
 (0)