dotnet / dotnet/BenchmarkDotNet

Include Environment Variables in JSON output in easier-to-parse form

Open
#2,506 2 comments 1 reaction 1 assignee Claimed by @AndreyAkinshin View on GitHub
Dominant language
C#
Stars
11.5k
Forks
1.1k
Avg merge
6d 11h
Merged PRs (30d)
12

Description

If I run a set of benchmarks with

`dotnet run -c:Release -- -f *Log* --runtimes net8.0 --envVars x:1 y:2`

And export a JSON report, the JSON contains the environment variables embedded in the DisplayInfo:

```json
"DisplayInfo":"LogBenchmark.TrackTrace: Job-OTYZFP(EnvironmentVariables=x=1,y=2, Runtime=.NET 8.0, Toolchain=net8.0, IterationCount=3, LaunchCount=1, WarmupCount=3)"
```

But I would like to be able to extract the environment variable values more easily from the report for further processing. What if there was an additional property bag in the report?

Something like:

```json
"EnvironmentVars": {
"x": "1",
"y:" "2"
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.