kcov vs lcov vs raw performance?

1k views Asked by At

Anyone able to give me some info on the relative performance of code running under following conditions,

  1. Just compiled
  2. Compiled with --coverage
  3. Running under kcov

Am I going to need twice a long to run my test suite if I integrated code coverage tool like gcov or kcov?

1

There are 1 answers

4
Paul D Smith On

My experience with this is as follows but note that actual results will probably depend heavily on your code.

  • Running with compiled '--coverage' is about half the speed of just compiled code.

  • Running with kcov is significantly (x6 - x10) times slower than just compiled code.

So what I'm doing is:

  • For a lot of runs or something that I know takes sometime, use '--coverage' then gcovr/lcov
  • For a one-off run of a shortish executable, use kcov.