Page MenuHomePhabricator

[BENCH] Add an option to output the result as a Junit report
ClosedPublic

Authored by Fabien on Apr 22 2020, 14:49.

Details

Summary

This adds a Junit output option to the benchmark. This is expected to
allow for displaying graphs on CI to track the duration over time, and
eventually trigger an event if a diff makes this duration to incease.

Test Plan
./src/bench/bitcoin-bench -printer=junit -filter="AES128CBC.*"

Check the output is a valid Junit XML.

Example result: https://build.bitcoinabc.org/viewLog.html?buildId=38288&buildTypeId=BitcoinABC_BitcoinAbcStaging&tab=testsInfo

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien planned changes to this revision.Apr 22 2020, 14:50

Use the junit output in CI

Fabien planned changes to this revision.Apr 22 2020, 15:16
Fabien planned changes to this revision.Apr 22 2020, 15:19

Snippet of first build failure:

Build 'Bitcoin-ABC / Diffs / Diff Testing' #9123, branch 'phabricator/diff/19017'
Started 2020-04-22 15:20:38 on 'agentvm211' by 'Fabien (fabien)'
Finished 2020-04-22 15:37:53 with status FAILURE 'Failed to parse xml report (new)'
Fabien planned changes to this revision.Apr 22 2020, 15:58
Fabien requested review of this revision.Apr 22 2020, 17:03
Fabien edited the test plan for this revision. (Show Details)
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/bench/bench.cpp
100 ↗(On Diff #19019)

I noticed our other junit results are like this. Seems like it kind of defeats the purpose when some CI systems stream junit results. Is it really necessary to collect the total_duration? I don't know if this really matters one way or the other.

This revision is now accepted and ready to land.Apr 22 2020, 18:21
src/bench/bench.cpp
100 ↗(On Diff #19019)

Maybe not, but teamcity collects on files anyway so it's basically free in our environment and still valid for others.