Skip to content

Commit 3e7b5cf

Browse files
authored
Revise print bound for BenchmarkGroup (#225)
1 parent dea246d commit 3e7b5cf

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/groups.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ function Base.show(io::IO, group::BenchmarkGroup)
297297
println(io)
298298
print(io, pad, " ", repr(k), " => ")
299299
show(IOContext(io, :pad => "\t"*pad), v)
300-
count > nbound && (println(io); print(io, pad, ""); break)
301300
count += 1
301+
count > nbound && length(group) > count && (println(io); print(io, pad, ""); break)
302302
end
303303
end
304304

test/GroupsTests.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ g1["c"] = tc
306306
3-element BenchmarkTools.BenchmarkGroup:
307307
tags: ["1", "2"]
308308
"c" => TrialEstimate(1.000 ns)
309-
"b" => TrialEstimate(4.123 μs)
310309
"""
311310
@test sprint(show, g1; context = :limit => false) == """
312311
3-element BenchmarkTools.BenchmarkGroup:
@@ -318,7 +317,6 @@ g1["c"] = tc
318317
3-element BenchmarkTools.BenchmarkGroup:
319318
tags: ["1", "2"]
320319
"c" => TrialEstimate(1.000 ns)
321-
"b" => TrialEstimate(4.123 μs)
322320
"""
323321

324322
# end # module

0 commit comments

Comments
 (0)