Scroll to navigation

MMTIC(3) mmlib library manual MMTIC(3)

NAME

mm_tic - Start an iteration of profiling
mm_toc - Add a point of measure to an iteration

SYNOPSIS

#include <mmprofile.h>

void mm_tic();
void mm_toc();
void mm_toc_label(const char* label);

Link with -lmmlib

DESCRIPTION

mm_tic() starts an iteration of profiling. It updates the timing statistics with the previous data if applicable and reset the metadata for a new timing iteration. Finally it measures the timestamp of the iteration start.

mm_toc() Add simply a new point of measure to the current iteration of profiling. If the maximum number of point of measure per iteration has been reached, then the new point will silently be ignored.

mm_toc_label() is the same as mm_toc() excepting it provides a way to label the meansure point. Beware than only the first occurrence of a label associated with a measure point will be retained. Any subsequent call to mm_toc_label() at the same measure point will be the same as calling mm_toc().

Care must be taken if a precision of few microseconds or less is desired with mm_toc_label(). The label copy has indeed overhead. However this overhead has influence only on the iteration that will actually copy the label string, thus will affect only the current and max timing measures. The influence on the mean will be negligible if the number of iterations is large enough. Therefore results must be interpreted in the light of this short coming.

The way the time is measured depends on the type of timer set by the mm_profile_reset(3) function.

RETURN VALUE

None.

SEE ALSO

mm_profile_reset(3), mm_profile_print(3)

2014