catchorg / catchorg/Catch2

How to output benchmark custom meta data correctly

Open
#2,886 2 comments 0 reactions 0 assignees View on GitHub
Feature Request
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

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.

```

First output

Second output
second line of the second output
third output

```

`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 `` 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:

```

GCC 11.4
AMD EPYC 7452 32-Core Processor

```

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

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.