diff --git a/docs/src/manual.md b/docs/src/manual.md index 0d8d0510..ed36cec8 100644 --- a/docs/src/manual.md +++ b/docs/src/manual.md @@ -85,7 +85,7 @@ You can pass the following keyword arguments to `@benchmark`, `@benchmarkable`, - `gcsample`: If `true`, run `gc()` before each sample. Defaults to `BenchmarkTools.DEFAULT_PARAMETERS.gcsample = false`. - `time_tolerance`: The noise tolerance for the benchmark's time estimate, as a percentage. This is utilized after benchmark execution, when analyzing results. Defaults to `BenchmarkTools.DEFAULT_PARAMETERS.time_tolerance = 0.05`. - `memory_tolerance`: The noise tolerance for the benchmark's memory estimate, as a percentage. This is utilized after benchmark execution, when analyzing results. Defaults to `BenchmarkTools.DEFAULT_PARAMETERS.memory_tolerance = 0.01`. -- `enable_linux_perf`: If `true`, profile using perf once. Defaults to `BenchmarkTools.DEFAULT_PARAMETERS.enable_linux_perf = false`. +- `enable_linux_perf`: If `true`, profile using perf `evals` times. Defaults to `BenchmarkTools.DEFAULT_PARAMETERS.enable_linux_perf = false`. To change the default values of the above fields, one can mutate the fields of `BenchmarkTools.DEFAULT_PARAMETERS`, for example: diff --git a/src/execution.jl b/src/execution.jl index bee0b116..59146102 100644 --- a/src/execution.jl +++ b/src/execution.jl @@ -604,8 +604,11 @@ function generate_benchmark_definition( $(setup) try $LinuxPerf.enable!(__linux_perf_bench) - # We'll just run it one time. + # We'll run it evals times. __return_val_2 = $(invocation) + for __iter in 2:__evals + $(invocation) + end $LinuxPerf.disable!(__linux_perf_bench) # trick the compiler not to eliminate the code if rand() < 0