DigitalInBlue / Celero

C++ Benchmark Authoring Library/Framework
Other
824 stars 95 forks source link

Add User Defined Measurements to output files #148

Closed wouter140 closed 3 years ago

wouter140 commented 3 years ago

I don't think this is a bug since it never seems to have been added, so I will write the issue as a feature request.

Feature Request

I am working with Celero for a bit now, trying to benchmark my custom memory allocation strategies. In my custom allocator, I track some memory statistics that I would like to compare them against each other with. I implemented these statistics to store their values in UDM classes inside the test fixture. This seems to work great and prints all the values to the console output as they should. However, when I specify an output file, my UDM values are not present.

I looked into the source of the classes that output data to file and found that indeed they do not have any functionality to do so. Is this intentional or has their never been a reason to implement this yet? https://github.com/DigitalInBlue/Celero/blob/0d7b24d77216e3b99382a2be139b44a57d1771f6/src/ResultTable.cpp#L119

Since the functionality is already present in the console output, would this be a simple copy-paste of that logic with small adjustments to add this functionality to the output files? https://github.com/DigitalInBlue/Celero/blob/0d7b24d77216e3b99382a2be139b44a57d1771f6/src/Print.cpp#L301

DigitalInBlue commented 3 years ago

Got it. Sorry it took a while to get over to this. You'll see this in the next version. It is currently on the develop branch.