Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Clover coverage metrics very slow

I just migrated from Jenkins to Bamboo 6.6.  My build and unit tests took about 20 minutes to complete on the previous Jenkins server.  It parsed the cobertura formatted xml file generated by gcovr, in under 30 seconds.  I added Bamboo tasks to:

  1. Run gcov on each file
  2. Generate a string containing every gcov file in the build.
  3. Run with the generated string as input.

This works, but is painfully slow, taking hours to run the script with all those files.  This is a little frustrating since the previous solution I was using parsed the coverage files in seconds.  For those that are using Bamboo for C/C++ projects, is this our only option?

1 answer

I'm not a strong python developer, so I'm not sure to optimize this.  But the bottleneck lies in line 405:


If I comment this line out, it obviously doesn't write all the correct data to the xml file, but execution time goes from hours to about 20 seconds.  

Jeyanthan I Atlassian Team Jul 02, 2018

Hi Mathew,

Did you try running the same in the respective Bamboo agent's command prompt (outside Bamboo)?

If you experience same slowness, it is likely that the issue is not on the Bamboo side.

Yes.  It is not on the bamboo side.  I didn’t expect that it was.  The appendChild function scales poorly as the container grows.  With a code base with hundreds of thousands of SLOC, that function gets called hundreds of thousands of times.  I abandoned trying to make that python script work and found another script created by somebody else.  This new script performs an XSLT transform from the cobertura XML output of gcovr to the clover XML format.  That script takes about 5 seconds to complete.  So I can collect coverage metrics in about 30 seconds again.

I knew the problem was in the python script.  It’s just that was the only recommended way to show c/c++ metrics that I could find here on the Atlassian boards.  Clover seems to work great on java projects using the maven and ant build systems.  I was frustrated thinking I might be the only one using Bamboo on c/c++ projects using cmake/ctest.

I did eventually get it to work, though I’m not really sure how clover integration benefits the project.  It only shows a single summary metric.  I ended up having to use gcovr to generate the detailed html reports anyway.  Independent of clover.  Bamboo has nice integration into the ctest test results, letting me easily submit jira tickets on new issues.  There doesn’t seem to be a way to apply a pass/fail coverage threshold, or submit tickets when the minimum coverage is not met.

Jeyanthan I Atlassian Team Jul 11, 2018

Sure. You may check for existing feature requests and create one if need be here:

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events