]>
Commit | Line | Data |
---|---|---|
3e87ef69 | 1 | // @(#) $Id$ |
2 | ||
4aa41877 | 3 | #ifndef AliHLTBenchmarkH |
4 | #define AliHLTBenchmarkH | |
159a9e4e | 5 | |
6 | //_____________________________________________________________ | |
7 | // | |
4aa41877 | 8 | // AliHLTBenchmark |
159a9e4e | 9 | // |
10 | // Benchmark class for level3 code | |
11 | // | |
12 | // | |
108615fc | 13 | |
73d9267f | 14 | #ifndef no_root |
108615fc | 15 | class TStopwatch; |
16 | class TString; | |
73d9267f | 17 | #else |
4aa41877 | 18 | class AliHLTStopwatch; |
73d9267f | 19 | #endif |
20 | ||
4aa41877 | 21 | class AliHLTBenchmark { |
108615fc | 22 | |
159a9e4e | 23 | public: |
4aa41877 | 24 | AliHLTBenchmark(); |
25 | virtual ~AliHLTBenchmark(); | |
159a9e4e | 26 | Int_t GetBench(const char *name); |
27 | void Start(const char *name); | |
28 | void Stop(const char *name); | |
29 | void Analyze(const char* name); | |
30 | ||
31 | static Double_t GetCpuTime(); | |
32 | ||
108615fc | 33 | private: |
34 | ||
35 | Int_t fNbench; //Number of active benchmarks | |
36 | Int_t fNmax; //Maximum number of benchmarks initialized | |
73d9267f | 37 | #ifndef no_root |
108615fc | 38 | TString *fNames; //Names of benchmarks |
39 | TStopwatch *fTimer; //Timers | |
73d9267f | 40 | #else |
159a9e4e | 41 | Char_t **fNames; //Names of benchmarks |
4aa41877 | 42 | AliHLTStopwatch *fTimer; //Timers |
73d9267f | 43 | #endif |
159a9e4e | 44 | Float_t *fSum; //sum of time |
45 | Float_t *fMin; //min of time | |
46 | Float_t *fMax; //max of time | |
47 | Int_t *fCount;// counter | |
108615fc | 48 | |
4aa41877 | 49 | ClassDef(AliHLTBenchmark,0) //L3 benchmark |
108615fc | 50 | }; |
51 | ||
4aa41877 | 52 | typedef AliHLTBenchmark AliL3Benchmark; // for backward compatibility |
53 | ||
108615fc | 54 | #endif |