benchmark_for
benchmark_for(const Action func, integer duration_ms) -> BenchmarkResult
Benchmarks a function by running it repeatedly for a specified duration and collecting timing statistics.
Parameters
- func: The function to benchmark.
- duration_ms: The total duration to run the benchmark for, in milliseconds.