Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add extra info to BenchmarkDotNet summary?

How can I add extra informationto extend the summary information produced by BenchmarkDotNet?
Like:

  • current host name or
  • current (Git) branch name

I would like to achieve something similar to this example:

Host MachineName: <Environment.MachineName>
Branch: <Git-Branch-Name>

BenchmarkDotNet=v0.13.1, OS=Windows 10...
Intel Core i7...
  [Host] : .NET Framework 4.8 (4.8.4300.0), X64 RyuJIT
  Dry    : .NET Framework 4.8 (4.8.4300.0), X64 RyuJIT

Job=Dry  IterationCount=1  LaunchCount=1  
RunStrategy=ColdStart  UnrollFactor=1  WarmupCount=1  

|           Method |       Mean | Error | 
|----------------- |----------- |------ |
| Foo              | 1,940.3 ms |    NA |

like image 952
ViktorZ Avatar asked Oct 16 '25 20:10

ViktorZ


1 Answers

Currently there is no way to extend the Summary with extra data. All you can do is to implement a custom column and add it to the config: https://benchmarkdotnet.org/articles/configs/columns.html

like image 169
Adam Sitnik Avatar answered Oct 19 '25 15:10

Adam Sitnik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!