Skip to content

Commit ca5d00d

Browse files
committed
Simplify code: no need to guard for progressid === nothing
... as `_withprogress` makes sure that it's a `UUID`.
1 parent df4a3de commit ca5d00d

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/execution.jl

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,7 @@ Base.run(group::BenchmarkGroup, args...; verbose::Bool = false, pad = "", kwargs
100100
gcscrub() # run GC before running group, even if individual benchmarks don't manually GC
101101
i = 1
102102
for id in keys(group)
103-
progressid === nothing || @logmsg(
104-
ProgressLevel,
105-
"Benchmarking",
106-
progress = ndone / nleaves,
107-
_id = progressid
108-
)
103+
@logmsg(ProgressLevel, "Benchmarking", progress = ndone / nleaves, _id = progressid)
109104
verbose &&
110105
println(pad, "($(i)/$(length(group))) benchmarking ", repr(id), "...")
111106
took_seconds = @elapsed begin
@@ -190,12 +185,7 @@ tune!(group::BenchmarkGroup; verbose::Bool = false, pad = "", kwargs...) =
190185
gcscrub() # run GC before running group, even if individual benchmarks don't manually GC
191186
i = 1
192187
for id in keys(group)
193-
progressid === nothing || @logmsg(
194-
ProgressLevel,
195-
"Tuning",
196-
progress = ndone / nleaves,
197-
_id = progressid
198-
)
188+
@logmsg(ProgressLevel, "Tuning", progress = ndone / nleaves, _id = progressid)
199189
verbose && println(pad, "($(i)/$(length(group))) tuning ", repr(id), "...")
200190
took_seconds = @elapsed tune!(
201191
group[id];

0 commit comments

Comments
 (0)