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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What is the purpose of "slices" (files with ".s" extension) and how/when are they used

I noticed that, when per-test coverage is turned on, there are a lot of ".s" files generated in the same folder where clover-coverage.db is. For example: clover-coverage.dbjrwz1f6yumcf_2rs_2exs1s_jri886qu.s.

What is the purpose of these files? Are they used only during reports generation or they are also used while coverage recording is ongoing?

There is so many of them generated during recording, that server where we run tests and collect coverage runs out of inodes (we do have a lot of tests).

1 answer

0 votes

These are per-test code coverage files. Indeed, there may be thousands of them - one file for every test executed.

As far as I remember, it could be even more than one per test, if multiple coverage recorders are running in the application. In such case, reducing a number of independent recorders could help (but this usually complicates the build setup).

 

Useful lecture:

http://openclover.org/doc/manual/latest/ant--coverage-recorders.html

https://openclover.org/doc/manual/latest/ant--test-results-and-per-test-coverage.html

http://openclover.org/doc/manual/latest/ant--runtime-performance-tuning.html

Thank you for your answer. We started running tests in batches, so we now produce manageable number of .s files per coverage run. 

I have one more question related to .s files, if you don't mind. It seems like they are serialized com.atlassian.clover.recorder.PerTestRecordingTranscript, and one of the fields in that class is:

private CloverBitSet coverage;

Is this pointing back to index in Clover db which holds which line got covered? For example, if that bitset has [4, 0, 0, 6], does it mean that test hit lines that correspond to those bits in index-to-element map in the database? I'm just interested in dumping info which test hit which line of code straight from artifacts produced during coverage run.

Is this pointing back to index in Clover db which holds which line got covered?

Close. Index in a bitset corresponds to index of an element registered in the database (it can be one of: method entry, statement, branch condition). 

Getting per-line coverage may be more complicated, as you have to take into account that method/statements/branches can span over multiple lines. 

Did you try to use SnapshotPrinter utility? It prints files/classes covered by given tests.

https://openclover.org/doc/manual/latest/hacking--measuring-per-test-coverage-for-manual-tests.html

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

173 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you