Skip to content

Commit c182d07

Browse files
committed
Run setup and teardown expressions when profiling under perf
1 parent 0ef2b49 commit c182d07

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/execution.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ function generate_benchmark_definition(
573573
),
574574
)
575575
if $(params.experimental_enable_linux_perf)
576+
$(setup)
576577
# Based on https://github.com/JuliaPerf/LinuxPerf.jl/blob/a7fee0ff261a5b5ce7a903af7b38d1b5c27dd931/src/LinuxPerf.jl#L1043-L1061
577578
__linux_perf_groups = BenchmarkTools.LinuxPerf.set_default_spaces(
578579
$(params.linux_perf_options.events),
@@ -593,6 +594,7 @@ function generate_benchmark_definition(
593594
__linux_perf_bench
594595
)
595596
end
597+
$(teardown)
596598
else
597599
__return_val_2 = nothing
598600
__linux_perf_stats = nothing

0 commit comments

Comments
 (0)