Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,14 @@ end
function _run(b::Benchmark, p::Parameters; verbose=false, pad="", warmup=true, kwargs...)
params = Parameters(p; kwargs...)
@assert params.seconds > 0.0 "time limit must be greater than 0.0"
params.gctrial && gcscrub()
start_time = Base.time()
trial = Trial(params)
warmup_start_time = Base.time()
if warmup
b.samplefunc(b.quote_vals, Parameters(params; evals=1)) #warmup sample
end
params.gcsample && gcscrub()
warmup_time = Base.time() - warmup_start_time
trial = Trial(params)
params.gctrial && gcscrub()
start_time = Base.time() - warmup_time
Comment thread
Zentrik marked this conversation as resolved.
Outdated
s = b.samplefunc(b.quote_vals, params)
push!(trial, s[1:(end - 1)]...)
return_val = s[end]
Expand Down