Is there a way to share benchmark code between criterion and iai? I'm wondering if it would be possible for it to just be a switch for how the benchmarks are run, or a macro, etc. It seems like criterion is useful for getting real timings, while iai is useful in CI, so I could see a case for supporting both, and running one locally and the other in CI.
I guess you could create a library with the benchmark code, and then have criterion and iai main benchmark programs that just call into that, but I was wondering if it would be feasible to avoid the repetition?
Is there a way to share benchmark code between criterion and iai? I'm wondering if it would be possible for it to just be a switch for how the benchmarks are run, or a macro, etc. It seems like criterion is useful for getting real timings, while iai is useful in CI, so I could see a case for supporting both, and running one locally and the other in CI.
I guess you could create a library with the benchmark code, and then have criterion and iai main benchmark programs that just call into that, but I was wondering if it would be feasible to avoid the repetition?