Skip to content

Commit 4f81618

Browse files
IanButterworthKristofferC
authored andcommitted
fix comma logic in time_print (#55977)
Minor formatting fix (cherry picked from commit 42737f7)
1 parent f8a5b98 commit 4f81618

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/timing.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function time_print(io::IO, elapsedtime, bytes=0, gctime=0, allocs=0, lock_confl
180180
print(io, length(timestr) < 10 ? (" "^(10 - length(timestr))) : "")
181181
end
182182
print(io, timestr, " seconds")
183-
parens = bytes != 0 || allocs != 0 || gctime > 0 || compile_time > 0
183+
parens = bytes != 0 || allocs != 0 || gctime > 0 || compile_time > 0 || lock_conflicts > 0
184184
parens && print(io, " (")
185185
if bytes != 0 || allocs != 0
186186
allocs, ma = prettyprint_getunits(allocs, length(_cnt_units), Int64(1000))
@@ -202,7 +202,7 @@ function time_print(io::IO, elapsedtime, bytes=0, gctime=0, allocs=0, lock_confl
202202
print(io, ", ", lock_conflicts, " lock conflict$plural")
203203
end
204204
if compile_time > 0
205-
if bytes != 0 || allocs != 0 || gctime > 0
205+
if bytes != 0 || allocs != 0 || gctime > 0 || lock_conflicts > 0
206206
print(io, ", ")
207207
end
208208
print(io, Ryu.writefixed(Float64(100*compile_time/elapsedtime), 2), "% compilation time")

0 commit comments

Comments
 (0)