00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef BLOCKSTATS_H
00025 #define BLOCKSTATS_H
00026
00047 class BlockStats {
00048 public:
00049
00056 BlockStats(const char *fileName, int memSize, const char *listStatsFile = 0,
00057 const char *elementStatsFile = 0);
00058 ~BlockStats(void);
00059
00061 void incrementRuns(void);
00062
00064 void incrementTriples(void);
00065
00075 void checkBlockSize(void);
00076
00078 int blockSize(void);
00079
00081 int memorySize(void);
00082
00084 bool memoryFull(void);
00085
00087 void memoryReset(void);
00088
00090 int runCount(void);
00091
00093 char *fileName(void);
00094
00096 char *listStatsFile(void);
00097
00099 char *elementStatsFile(void);
00100
00101 private:
00102 int _blockSize;
00103 int _runs;
00104 const int _memSize;
00105 const int _tripleSize;
00106 int _maxTriplesInMem;
00107 int _currentTriplesInMem;
00108 char *_fileName;
00109 char *_listStatsFile;
00110 char *_elementStatsFile;
00111 };
00112
00113 #endif