BenchmarkDotNet
BenchmarkDotNet copied to clipboard
Feature Request: allow to extend and/or parametrize RPlotExporter, or at least specify custom R script
The current implementation (v0.14.0) of RPlotExporter (src/BenchmarkDotNet/Exporters/RPlotExporter.cs) works OK and IMHO is nicely implemented, but lacks for flexibility, because:
- almost all methods are non-virtual and/or static
- depends on internal dependencies (i.e.
IExporterDependencies,RuntimeInformation,ExporterBase.GetArtifactFullName, andAsyncProcessOutputReader) - 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:
- Allow to parametrize the file name/path of the R script, so that one can create its own and use it as desired
- Slightly change the way that the class
RPlotExporteris implemented, so that it can be easily inherited and customized by overriding some methods - Make
IExporterDependencies,RuntimeInformation, andAsyncProcessOutputReaderaspublicinstead ofinternal, 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.