Skip to content

Commit

Permalink
fix: enable arbitrary benchmark aggregations (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored Nov 24, 2024
1 parent 6b55559 commit 5576221
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions DifferentiationInterfaceTest/src/tests/benchmark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,19 @@ function record!(
calls::Integer,
aggregation,
)
bench_agg = aggregation(bench)
row = DifferentiationBenchmarkDataRow(;
backend=backend,
scenario=scenario,
operator=Symbol(operator),
prepared=prepared,
calls=calls,
samples=length(bench.samples),
evals=Int(bench_agg.evals),
time=bench_agg.time,
allocs=bench_agg.allocs,
bytes=bench_agg.bytes,
gc_fraction=bench_agg.gc_fraction,
compile_fraction=bench_agg.compile_fraction,
evals=Int(bench.samples[1].evals),
time=aggregation(getfield.(bench.samples, :time)),
allocs=aggregation(getfield.(bench.samples, :allocs)),
bytes=aggregation(getfield.(bench.samples, :bytes)),
gc_fraction=aggregation(getfield.(bench.samples, :gc_fraction)),
compile_fraction=aggregation(getfield.(bench.samples, :compile_fraction)),
)
return push!(data, row)
end

0 comments on commit 5576221

Please sign in to comment.