Skip to content

Commit

Permalink
Small cleanup in XML reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
horenmar committed Aug 14, 2023
1 parent a64ff32 commit e09de72
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/catch2/reporters/catch_reporter_xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,26 +234,23 @@ namespace Catch {
}

void XmlReporter::benchmarkEnded(BenchmarkStats<> const& benchmarkStats) {
m_xml.startElement("mean")
m_xml.scopedElement("mean")
.writeAttribute("value"_sr, benchmarkStats.mean.point.count())
.writeAttribute("lowerBound"_sr, benchmarkStats.mean.lower_bound.count())
.writeAttribute("upperBound"_sr, benchmarkStats.mean.upper_bound.count())
.writeAttribute("ci"_sr, benchmarkStats.mean.confidence_interval);
m_xml.endElement();
m_xml.startElement("standardDeviation")
m_xml.scopedElement("standardDeviation")
.writeAttribute("value"_sr, benchmarkStats.standardDeviation.point.count())
.writeAttribute("lowerBound"_sr, benchmarkStats.standardDeviation.lower_bound.count())
.writeAttribute("upperBound"_sr, benchmarkStats.standardDeviation.upper_bound.count())
.writeAttribute("ci"_sr, benchmarkStats.standardDeviation.confidence_interval);
m_xml.endElement();
m_xml.startElement("outliers")
m_xml.scopedElement("outliers")
.writeAttribute("variance"_sr, benchmarkStats.outlierVariance)
.writeAttribute("lowMild"_sr, benchmarkStats.outliers.low_mild)
.writeAttribute("lowSevere"_sr, benchmarkStats.outliers.low_severe)
.writeAttribute("highMild"_sr, benchmarkStats.outliers.high_mild)
.writeAttribute("highSevere"_sr, benchmarkStats.outliers.high_severe);
m_xml.endElement();
m_xml.endElement();
}

void XmlReporter::benchmarkFailed(StringRef error) {
Expand Down

0 comments on commit e09de72

Please sign in to comment.