00001 /** \file stats.h 00002 * \brief Statistics. 00003 */ 00004 #ifndef tm_STATS_H 00005 #define tm_STATS_H 00006 00007 /****************************************************************************/ 00008 00009 /** 00010 * Timing statstics. 00011 */ 00012 typedef struct tm_time_stat { 00013 const char *name; /*!< The name for this statistic. */ 00014 double td; /*!< Last time in seconds. */ 00015 double ts; /*!< Total time in seconds. */ 00016 double tw; /*!< Worst time in seconds. */ 00017 double ta; /*!< Average time in seconds. */ 00018 double t0; /*!< Absolute time at tm_time_stat_begin(). */ 00019 double t1; /*!< Absolute time at tm_time_stat_end(). */ 00020 double t01; /*!< Aux time at tm_time_stat_begin(). */ 00021 double t11; /*!< Aux time at tm_time_stat_end(). */ 00022 short tw_changed; /*!< Time worst changed? */ 00023 unsigned int count; /*!< Total calls to tm_time_stat_end(). */ 00024 } tm_time_stat; 00025 00026 void tm_time_stat_begin(tm_time_stat *ts); 00027 void tm_time_stat_end(tm_time_stat *ts); 00028 00029 void tm_print_stats(); 00030 void tm_print_block_stats(); 00031 void tm_print_time_stats(); 00032 00033 #endif