Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Allow writing BenchmarkDotNet results to a json file #338

Open
bjornbouetsmith opened this issue Oct 12, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@bjornbouetsmith
Copy link

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<BenchmarkDocument> 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

@bjornbouetsmith bjornbouetsmith added the enhancement New feature or request label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant