Skip to content

Commit 182b09e

Browse files
committed
more'
1 parent f2513ec commit 182b09e

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/trials.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ function Base.show(io::IO, ::MIME"text/plain", t::Trial)
454454

455455
# Histogram
456456

457-
logbins = get(io, :logbins, nothing) == true
457+
logbins = get(io, :logbins, nothing) === true
458458
caption = logbins ? ("log(counts) from " * samplesstr) : samplesstr
459459

460460
# The height and width of the printed histogram in characters:

test/ExecutionTests.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ tune!(b)
135135
# test kwargs separated by `,`
136136
@benchmark(output=sin(x), setup=(x=1.0; output=0.0), teardown=(@test output == sin(x)))
137137

138-
for (tf, rex1, rex2) in ((false, r"0.5 ns +Histogram: frequency by time +8 ns", r"Histogram: frequency"),
139-
(true, r"0.5 ns +Histogram: log\(frequency\) by time +8 ns", r"Histogram: log\(frequency\)"))
138+
for (tf, rex1, rex2) in ((false, r"0.5 ns ", r" [0-9_]+ samples, each"),
139+
(missing, r"0.5 ns ", r" [0-9_]+ samples, each"),
140+
(true, r"0.5 ns +log\(counts\) from ", r"log\(counts\) from [0-9_]+ samples"))
140141
io = IOBuffer()
141142
ioctx = IOContext(io, :histmin=>0.5, :histmax=>8, :logbins=>tf)
142143
@show tf
@@ -154,13 +155,6 @@ for (tf, rex1, rex2) in ((false, r"0.5 ns +Histogram: frequency by time +8 ns",
154155
str = String(take!(io))
155156
idx = findfirst(rex2, str)
156157
@test isa(idx, UnitRange)
157-
# A peaked distribution will trigger log by default
158-
t = [fill(1, 21); 2]
159-
b = BenchmarkTools.Trial(BenchmarkTools.DEFAULT_PARAMETERS, t/sum(t)*1e9*BenchmarkTools.DEFAULT_PARAMETERS.seconds, zeros(100), 0, 0)
160-
show(ioctx, MIME("text/plain"), b)
161-
str = String(take!(io))
162-
idx = findfirst(rex2, str)
163-
@test isa(idx, UnitRange)
164158
end
165159

166160
#############

0 commit comments

Comments
 (0)