[FR] Easy attaching perf from within the library
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.8k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
**Is your feature request related to a problem? Please describe.**
Sometimes benchmarks have a heavy setup which affects counters/recordings.
It would be nice to easily skip heavy initialization when using perf.
**Describe the solution you'd like**
folly benchmarks has `--bm_perf_args` which will start perf after doing a first iteration of a benchmark.
Running the first iteration of the benchmark allows to skip initialization of statics.
For example in folly benchmarks I can run `--bm_perf_args=record` or `--bm_perf_args=stat`.
That works ok but isn't very generic. Maybe you know something more generic?
**Describe alternatives you've considered**
It is possible to do this through external tools but is very annoying.
Contributor guide
Assessment
This issue has not been assessed yet.