Add measurement samples to xml reporter

This commit is contained in:
Serpent7776 2024-05-02 13:58:14 +02:00
parent fa5a53df17
commit f2dc9dbb2d

View File

@ -250,6 +250,12 @@ namespace Catch {
.writeAttribute("lowSevere"_sr, benchmarkStats.outliers.low_severe)
.writeAttribute("highMild"_sr, benchmarkStats.outliers.high_mild)
.writeAttribute("highSevere"_sr, benchmarkStats.outliers.high_severe);
auto samples = m_xml.scopedElement("samples");
for (auto const& sample : benchmarkStats.samples) {
m_xml.startElement("sample", XmlFormatting::Indent)
.writeText(std::to_string(sample.count()), XmlFormatting::None)
.endElement(XmlFormatting::Newline);
}
m_xml.endElement();
}