Paul D Smith
Paul D Smith

Reputation: 749

kcov vs lcov vs raw performance?

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?

Upvotes: 3

Views: 1275

Answers (1)

Paul D Smith
Paul D Smith

Reputation: 749

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.

Upvotes: 3

Related Questions