Skip to content

Commit 5576221

Browse files
authored
fix: enable arbitrary benchmark aggregations (#639)
1 parent 6b55559 commit 5576221

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

DifferentiationInterfaceTest/src/tests/benchmark.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,19 @@ function record!(
9393
calls::Integer,
9494
aggregation,
9595
)
96-
bench_agg = aggregation(bench)
9796
row = DifferentiationBenchmarkDataRow(;
9897
backend=backend,
9998
scenario=scenario,
10099
operator=Symbol(operator),
101100
prepared=prepared,
102101
calls=calls,
103102
samples=length(bench.samples),
104-
evals=Int(bench_agg.evals),
105-
time=bench_agg.time,
106-
allocs=bench_agg.allocs,
107-
bytes=bench_agg.bytes,
108-
gc_fraction=bench_agg.gc_fraction,
109-
compile_fraction=bench_agg.compile_fraction,
103+
evals=Int(bench.samples[1].evals),
104+
time=aggregation(getfield.(bench.samples, :time)),
105+
allocs=aggregation(getfield.(bench.samples, :allocs)),
106+
bytes=aggregation(getfield.(bench.samples, :bytes)),
107+
gc_fraction=aggregation(getfield.(bench.samples, :gc_fraction)),
108+
compile_fraction=aggregation(getfield.(bench.samples, :compile_fraction)),
110109
)
111110
return push!(data, row)
112111
end

0 commit comments

Comments
 (0)