How to set the Ratio column style in BenchmarkDotNet results

By default when you output the Ratio column in BenchmarkDotNet using the Baseline = true attribute it is output using the Value approach below. This means that the baseline method will be shown as 1.00 and that other methods will be shown as a relative value to this.

If we wish we can also output the Ratio column using trends or percentages as shown below. To do this we need to tell BenchmarkDotNet the name of the class which contains our configuration and then within that class with need to set the RatioStyle enum…

Leave a Reply

Your email address will not be published. Required fields are marked *