Skip to content

Commit 42737f7

Browse files
fix comma logic in time_print (#55977)
Minor formatting fix
1 parent 6b9719f commit 42737f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/timing.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function time_print(io::IO, elapsedtime, bytes=0, gctime=0, allocs=0, lock_confl
206206
print(io, length(timestr) < 10 ? (" "^(10 - length(timestr))) : "")
207207
end
208208
print(io, timestr, " seconds")
209-
parens = bytes != 0 || allocs != 0 || gctime > 0 || compile_time > 0
209+
parens = bytes != 0 || allocs != 0 || gctime > 0 || compile_time > 0 || lock_conflicts > 0
210210
parens && print(io, " (")
211211
if bytes != 0 || allocs != 0
212212
allocs, ma = prettyprint_getunits(allocs, length(_cnt_units), Int64(1000))
@@ -228,7 +228,7 @@ function time_print(io::IO, elapsedtime, bytes=0, gctime=0, allocs=0, lock_confl
228228
print(io, ", ", lock_conflicts, " lock conflict$plural")
229229
end
230230
if compile_time > 0
231-
if bytes != 0 || allocs != 0 || gctime > 0
231+
if bytes != 0 || allocs != 0 || gctime > 0 || lock_conflicts > 0
232232
print(io, ", ")
233233
end
234234
print(io, Ryu.writefixed(Float64(100*compile_time/elapsedtime), 2), "% compilation time")

0 commit comments

Comments
 (0)