00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00023 #ifndef INCLUDE_PERFMON_H
00024 #define INCLUDE_PERFMON_H
00025
00026 #include "input.h"
00027 #include "MyList.h"
00028
00029
00066 class PerfMonitorPoint;
00067
00068 typedef MyList<double> MyListOfDouble;
00069 class PerfMonitor
00070 {
00071 private:
00072 MyList<MyListOfDouble> records;
00073 MyList<PerfMonitorPoint> points;
00074 BOOL Save();
00075
00076 public:
00077 BOOL enable;
00078 MyString fileName;
00079
00080 PerfMonitor();
00081 ~PerfMonitor();
00082
00083 PerfMonitorPoint * AddTitle(char *name);
00084 void AddRecord();
00085 void Reset();
00086
00087 PerfMonitorPoint * Find(char *name,BOOL addIfNotExist);
00088 void Reset(char *name);
00089 void Begin(char *name,BOOL reset=FALSE);
00090 void End(char *name);
00091 };
00092
00093 class PerfMonitorPoint
00094 {
00095 public:
00096 MyString name;
00097 Timer timer;
00098 PerfMonitor *monitor;
00099 double value;
00100 int nbValue;
00101
00102 public:
00103 PerfMonitorPoint();
00104 PerfMonitorPoint(char *_name,PerfMonitor *_monitor);
00105 void Set(char *_name,PerfMonitor *_monitor);
00106 void operator=(PerfMonitorPoint &src);
00107
00108 void Reset();
00109 void Begin(BOOL reset=FALSE);
00110 void End();
00111 };
00112
00113 #endif