dotnet / dotnet/BenchmarkDotNet

Feature Request: allow to extend and/or parametrize RPlotExporter, or at least specify custom R script

Open
#2,620 4 comments 0 reactions 0 assignees View on GitHub
Area:Exporters up-for-grabs
Dominant language
C#
Stars
11.5k
Forks
1.1k
Avg merge
4d 11h
Merged PRs (30d)
11

Description

The current implementation (v0.14.0) of `RPlotExporter` [(src/BenchmarkDotNet/Exporters/RPlotExporter.cs)](https://github.com/dotnet/BenchmarkDotNet/blob/a739e2cc9a9626b17a85e0fbe7d016282948cad1/src/BenchmarkDotNet/Exporters/RPlotExporter.cs) works OK and IMHO is nicely implemented, but lacks for flexibility, because:
1. almost all methods are non-virtual and/or static
2. depends on *internal* dependencies (i.e. `IExporterDependencies`, `RuntimeInformation`, `ExporterBase.GetArtifactFullName`, and `AsyncProcessOutputReader`)
3. doesn't allow to specify a custom R script (since it's loaded from the assembly resources BenchmarkDotNet)

This greately limits the usability of such wonderfull feature.
I propose to:
1. Allow to parametrize the file name/path of the R script, so that one can create its own and use it as desired
2. Slightly change the way that the class `RPlotExporter` is implemented, so that it can be easily inherited and customized by overriding some methods
3. Make `IExporterDependencies`, `RuntimeInformation`, and `AsyncProcessOutputReader` as `public` instead of `internal`, so that they can be referred by inherited classes and other custom-made exporters

I'm available to prepare a PR, if the proposal is deemed usefull.

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.