*****************************************************************************
* CTC++, Test Coverage Analyzer for C/C++, Version 9.0 *
* *
* EXECUTION TIME LISTING *
* *
* Copyright (c) 1993-2013 Testwell Oy *
* Copyright (c) 2013-2018 Verifysoft Technology GmbH *
*****************************************************************************
Symbol file(s) used : MON.sym (Fri May 04 10:27:54 2018)
Data file(s) used : MON.dat (Fri May 04 10:28:24 2018)
Listing produced at : Fri May 04 10:28:52 2018
Execution cost type : Clock ticks
MONITORED SOURCE FILE : F:\ctcwork\v90\doc\examples\prime.c
INSTRUMENTATION MODE : multicondition+inclusive_timing
EXECUTION =======EXECUTION COST========
COUNT TOTAL AVERAGE MAX LINE FUNCTION
=============================================================================
1 21060 21060.0 21060 8 main()
MONITORED SOURCE FILE : F:\ctcwork\v90\doc\examples\io.c
INSTRUMENTATION MODE : multicondition+inclusive_timing
EXECUTION =======EXECUTION COST========
COUNT TOTAL AVERAGE MAX LINE FUNCTION
=============================================================================
4 21060 5265.0 8362 5 io_ask()
3 0 0.0 0 18 io_report()
MONITORED SOURCE FILE : F:\ctcwork\v90\doc\examples\calc.c
INSTRUMENTATION MODE : multicondition+inclusive_timing
EXECUTION =======EXECUTION COST========
COUNT TOTAL AVERAGE MAX LINE FUNCTION
=============================================================================
3 0 0.0 0 4 is_prime()
By default CTC++ does not instrument the code for timing. But when it is selected, it is either inclusive (like here) or exclusive. In inclusive timing the function's time contains all the time spent in the function and in the functions that it had called. In exclusive timing CTC++ extracts from the function's time the time that was spent in those instrumented functions that the function had called.
This examples is in line with other examples in these HTML pages. Four inputs (2, 5, 20, 0) were given to the program. In total the program execution took about 20 seconds. All measured time was spent in waiting the keyboard input in function io_ask(). At windows the system function clock() granularity is so poor that it did not advance during the execution of the other functions.
Instead of clock() you can introduce your own time-taking function (better granularity, describes better the function execution cost,...) and ask CTC++ to use that in time measurements.