Coverage is important to see which parts of the code have not been executed. In my experience, it should accumulate in several use cases, because any single launch of the software will use only some code.
Profiling means different things at different times. Sometimes this means measuring performance. Sometimes this means diagnosing memory leaks. Sometimes this means gaining visibility in multi-threaded or other low-level activities.
When the goal is to improve software performance by looking for so-called bottlenecks and fixing them, don't just settle for a profiler, not even a highly recommended or respectable one. It is imperative to use the view that receives the right information and presents it to you in the right direction, because there is a lot of confusion about this. More on this.
Added: For the coverage tool, I always did it myself. In almost every regular and basic block, I insert this call: Utils.CovTest("file name, routine name, comment that tells what being done here") . The subroutine records the fact that it was called, and when the program ends, all these comments are added to the text file. Then there is a post-processing step in which this file is "subtracted" from the full list (obtained by grep-like). The result is a list of what has not been tested, requiring additional test cases.
When you do not test coverage, Utils.CovTest does nothing. I leave it out of the innermost loops anyway, so this doesn't greatly affect performance. In C and C ++, I do this with a macro, which, under normal use, expands to zero.
Mike dunlavey
source share