The time your program takes to run depends on how many instructions it executes, how many machine cycles each instruction requires, and the machine's clock rate, which is typically expressed in millions of cycles per second (MHz). Quantify analyzes your program's instructions and uses Object Code Insertion (OCI) technology to insert code that counts, at run time, the actual number of machine cycles your program requires to execute. Counting cycles means that the time Quantify records in your code is identical from run to run, assuming that the input does not change. This complete repeatability enables you to see precisely the effects of algorithm and data structure changes.
Since Quantify counts cycles, it gives you accurate data at any scale. You do not need to create long runs or make numerous short runs to get meaningful data as you must with sampling-based profilers: One short run and you have the data. As soon as you can run a test program, you can collect meaningful performance data and establish a baseline for future comparison.
For operating system calls, Quantify times each call and converts the elapsed (wall-clock) time into the equivalent number of machine cycles. Quantify measures the elapsed time (wall clock) of each system call made by your program and reports how long your program waited for those calls to complete. You can immediately see the effects of improved file access or reduced network delay on your program. You can optionally choose to measure system calls by the amount of time the kernel recorded for the process, much like the UNIX /bin/time utility records.
The calculations based on the counted machine cycles and on the wall-clock time, taken together, reflect the time you can expect your original program to run.
Quantify distributes time accurately: Quantify distributes each function's time to its callers so you can tell at a glance which function calls were responsible for the majority of your program's time. Unlike gprof, Quantify does not make assumptions about the average cost per function. Quantify measures it directly.