00001 /*******************************************************/ 00002 /* "C" Language Integrated Production System */ 00003 /* */ 00004 /* CLIPS Version 6.24 06/05/06 */ 00005 /* */ 00006 /* CONSTRUCT PROFILING FUNCTIONS HEADER FILE */ 00007 /*******************************************************/ 00008 00009 /*************************************************************/ 00010 /* Purpose: */ 00011 /* */ 00012 /* Principal Programmer(s): */ 00013 /* Gary D. Riley */ 00014 /* */ 00015 /* Contributing Programmer(s): */ 00016 /* */ 00017 /* Revision History: */ 00018 /* */ 00019 /* 6.24: Renamed BOOLEAN macro type to intBool. */ 00020 /* */ 00021 /*************************************************************/ 00022 00023 #ifndef _H_proflfun 00024 00025 #define _H_proflfun 00026 00027 #ifdef LOCALE 00028 #undef LOCALE 00029 #endif 00030 00031 #ifdef _PROFLFUN_SOURCE_ 00032 #define LOCALE 00033 #else 00034 #define LOCALE extern 00035 #endif 00036 00037 #include "userdata.h" 00038 00039 struct constructProfileInfo 00040 { 00041 struct userData usrData; 00042 long numberOfEntries; 00043 unsigned int childCall : 1; 00044 double startTime; 00045 double totalSelfTime; 00046 double totalWithChildrenTime; 00047 }; 00048 00049 struct profileFrameInfo 00050 { 00051 unsigned int parentCall : 1; 00052 unsigned int profileOnExit : 1; 00053 double parentStartTime; 00054 struct constructProfileInfo *oldProfileFrame; 00055 }; 00056 00057 #define PROFLFUN_DATA 15 00058 00059 struct profileFunctionData 00060 { 00061 double ProfileStartTime; 00062 double ProfileEndTime; 00063 double ProfileTotalTime; 00064 int LastProfileInfo; 00065 double PercentThreshold; 00066 struct userDataRecord ProfileDataInfo; 00067 unsigned char ProfileDataID; 00068 int ProfileUserFunctions; 00069 int ProfileConstructs; 00070 struct constructProfileInfo *ActiveProfileFrame; 00071 char *OutputString; 00072 }; 00073 00074 #define ProfileFunctionData(theEnv) ((struct profileFunctionData *) GetEnvironmentData(theEnv,PROFLFUN_DATA)) 00075 00076 LOCALE void ConstructProfilingFunctionDefinitions(void *); 00077 LOCALE void ProfileCommand(void *); 00078 LOCALE void ProfileInfoCommand(void *); 00079 LOCALE void StartProfile(void *, 00080 struct profileFrameInfo *, 00081 struct userData **, 00082 intBool); 00083 LOCALE void EndProfile(void *,struct profileFrameInfo *); 00084 LOCALE void ProfileResetCommand(void *); 00085 LOCALE void ResetProfileInfo(struct constructProfileInfo *); 00086 00087 LOCALE double SetProfilePercentThresholdCommand(void *); 00088 LOCALE double SetProfilePercentThreshold(void *,double); 00089 LOCALE double GetProfilePercentThresholdCommand(void *); 00090 LOCALE double GetProfilePercentThreshold(void *); 00091 LOCALE intBool Profile(void *,char *); 00092 LOCALE void DeleteProfileData(void *,void *); 00093 LOCALE void *CreateProfileData(void *); 00094 LOCALE char *SetProfileOutputString(void *,char *); 00095 00096 #endif 00097 00098
1.5.6