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

How to output benchmark custom meta data correctly #2886

Open
SimeonEhrig opened this issue Jul 10, 2024 · 2 comments
Open

How to output benchmark custom meta data correctly #2886

SimeonEhrig opened this issue Jul 10, 2024 · 2 comments

Comments

@SimeonEhrig
Copy link

We want to use Catch2 benchmark for performance regression tests. Therefore we output the data as xml and store it in a database that we can compare the performance over different commits. For comparison reason, we need to store meta data, such like which compiler and which CPU was used and so one.

If we use std::cout, we get a single xml region, which contains all the output and we need to parse the content by our self to split up the different information.

<StdOut>
First output

Second output
second line of the second output
third output
</StdOut>

INFO, WARN and so one is similar. It has the advantage, that each output become it's own xml region, but there is still no difference between the xml region. Each INFO creates the same <Info> xml region and we need to search for an identifier in the content of the xml region to get the right information such like which compiler version.

In the best case, Catch2 provides a mechanism, which produces the following kind of xml output:

<CustomData>
  <CompilerVersion>GCC 11.4</CompilerVersion>
  <CPUName>AMD EPYC 7452 32-Core Processor</CPUName>
</CustomData>

Is there a feature in Catch2 to achieve it and if not, what is the best practice to get something similar?

@SimeonEhrig
Copy link
Author

cc @mehmetyusufoglu

@horenmar
Copy link
Member

There is currently no feature for this, and I am not aware of commonly used benchmarking framework with labels like these -> more often there is a support for user defined numeric counters. However, if someone adds the numeric counters, adding free form text labels should be just some extra boilerplate.

User defined counters are a thing I would like to add at some point, but my own work on Catch2 is on hold at least until October.

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

No branches or pull requests

2 participants