Value in some Benchmark::IPS enhancements?

I’ve written some code to allow me to write a large(ish) benchmarking suite that can use text separators in the report to divide logical sections from each other, with some other visual enhancements, such as some visual feedback during the warmup phase when doing an interactive Benchmark::IPS run.

and

give some idea of the possibilities. Basically, it adds the notion of separators, which are labels with optional code blocks attached which are not benchmarked, but are just there as part of the report. The labels for separators and for reports can now also be colorized, and it’ll just work. I also added a bit of color to the “fastest” so that it would pop out more if there are a lot of comparisons, and underlining for the relevant line. I haven’t decided if I like the underlining or not, but it does make it easy to find the fastest line in a long chunk of benchmarks.

Before I take the time to clean this up, document it, and make a PR for it, I want to see if this is something that would be a beneficial general enhancement on Benchmark::IPS, as it’s implementation touches a bunch of the current implementation, or if it’d be better just packaged as a standalone shard (albeit one that in the current form would monkeypatch a lot of Benchmark::IPS)?

7 Likes