00001 #ifndef __STATS_PROFILER_INCLUDED__ 00002 #define __STATS_PROFILER_INCLUDED__ 00003 00004 /* make sure gcc3 won't hit here */ 00005 #ifndef GCCTOOOLD 00006 00007 typedef struct profile_object{ 00008 00009 char* name; 00010 int count; 00011 double elapsed; 00012 struct profile_object* next; 00013 00014 }profile_object; 00015 00016 profile_object* profiled_data_find_last_object(); 00017 profile_object* profile_object_create(char * name); 00018 profile_object* profile_object_find_by_name(char * name); 00019 double safe_divide(double x, int y, int reverse); 00020 void profile_object_update_count(char * name, int val); 00021 void profile_object_update_elapsed(char * name, double val); 00022 void profile_data_print(); 00023 void profile_data_output_mrtg(char * name,char * delim); 00024 00025 #endif 00026 00027 #endif