BenchmarkDotNet icon indicating copy to clipboard operation
BenchmarkDotNet copied to clipboard

How to append values to the same .csv on each execution?

Open Ryujose opened this issue 8 years ago • 2 comments

Hello community.

I'm trying to append values to the same .csv on each execution but I can't.

Right now I'm using this cfg on a class inherited of "ManualConfig" class ->

Add(new CsvExporter(
                CsvSeparator.CurrentCulture,
                new BenchmarkDotNet.Reports.SummaryStyle
                {
                    PrintUnitsInHeader = false,
                    PrintUnitsInContent = true,
                    TimeUnit = null, 
                    SizeUnit = null 
                }));

Note: The file is created but it doesn't append any value after first execution and I'm using .NET framework 4.6.

I'll appreciate any help. Thanks!

Regards, Jose Luis Guerra Infante.

Ryujose avatar Jul 20 '18 19:07 Ryujose

I've seen the CsvMeasurementExporter and it's approximately the theoretically thing that I was searching, but it is on one execution, and the thing that I want to see it's the difference of the measures that can be on different changes of the method.

Is there a way to add a column of type DateTime or something similar to do a filter on the library?

For example:

  1. First execution I want to save the present data of the measurements and etc, and add the DateTime of those measurements.
  2. Second execution I want to save the present data of the measurements and etc and the data of the first execution, and add the DateTime of those measurements.

I'm talking about DateTime but there's can be a commit or something if you're working with a source control for example.

Ryujose avatar Jul 20 '18 20:07 Ryujose

We've done an implementation that cover our need, I'll proceed to close the issue.

Ryujose avatar Jul 26 '18 00:07 Ryujose