elastic / elastic/ecs-dotnet

[FEATURE] Allow writing BenchmarkDotNet results to a json file

Open
#338 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
HTML
Stars
137
Forks
70
PR merge metrics
No merged PRs in 30d

Description

**ECS integration/library project(s)**: Elastic.CommonSchema.BenchmarkDotNetExporter

**Is your feature request related to a problem? Please describe.**
Many places its not possible to write directly to elastic for security reasons, so it would be nice if it would be possible to get the exporter to simply write a json file instead of trying to push documents directory to the elastic service.

**Describe the solution you'd like**
* Allow ElasticsearchBenchmarkExporterOptions overload that will make the ElasticsearchBenchmarkExporter write to a configured directory instead of writing directly to elastic.
* Alternatively move/expose the methods that converts the Summary into elastic objects so people can call that directly and write the objects to a json file.

**Describe alternatives you've considered**
* Use reflection to to access the private method: `private List CreateBenchmarkDocuments(Summary summary)` and simply use a json writer to write the BenchmarkDocument objects to a file.

* Hack in a proxy of some sort that takes the data that the exporter posts and write it to a file.

None of the approaches are good - the reflection approach is the least hacky.

I am willing to make a PR for either solution, if you will allow me

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.