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

Added support to get exported file paths #2619

Open
filzrev opened this issue Aug 20, 2024 · 0 comments
Open

Added support to get exported file paths #2619

filzrev opened this issue Aug 20, 2024 · 0 comments

Comments

@filzrev
Copy link

filzrev commented Aug 20, 2024

I want to get exported files that are created by Exporters (e.g. MarkdownExporter's output)

Related logics are implemented by ExporterBase.cs.
But it's defined as internal. So it can't be used from external code.

https://github.com/dotnet/BenchmarkDotNet/blob/master/src/BenchmarkDotNet/Exporters/ExporterBase.cs#L51-L55

Is it possible to add supporting feature that get ExportedFiles from benchmark results?
For example.

1. Add ExportedFiles information to benchmark results summary.

If it can add ExportedFiles property to existing benchmark summary reports.
If it's possible It can be used in a simpler way.

But Exported files are created by following lines.
https://github.com/dotnet/BenchmarkDotNet/blob/master/src/BenchmarkDotNet/Running/BenchmarkRunnerClean.cs#L292-L297

So might not possible to modify Summary object on above lines. (Because summary is designed as immutable)

2. Change ExporterBase::GetArtifactFullName API to public.

If GetArtifactFullName API can be changed to public
It can get exported files with following code.

var exportedFiles = config.GetExporters().OfType<ExporterBase>().Select(x=> x.GetArtifactFullName(summary))

Note

Some exporter ( e,g, RPlotExporter) seems that don't inherited from ExporterBase. (that output multiple files?)
So it might be better to adding GetArtifactFullNames to IExporter interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant