]>
Commit | Line | Data |
---|---|---|
57a4102f | 1 | //-*- Mode: C++ -*- |
be6bf2a1 | 2 | // $Id$ |
57a4102f | 3 | // ************************************************************************ |
4 | // This file is property of and copyright by the ALICE HLT Project * | |
5 | // ALICE Experiment at CERN, All rights reserved. * | |
6 | // See cxx source for full Copyright notice * | |
7 | // * | |
8 | //************************************************************************* | |
9 | ||
10 | ||
11 | #ifndef ALIHLTCOMPONENTBENCHMARK_H | |
12 | #define ALIHLTCOMPONENTBENCHMARK_H | |
13 | ||
14 | #include "TStopwatch.h" | |
15 | #include "TString.h" | |
16 | ||
17 | /** | |
18 | * @class AliHLTComponentBenchmark | |
19 | * | |
20 | * AliHLTComponentBenchmark can be used to benchmark HLT compnoents | |
21 | */ | |
22 | class AliHLTComponentBenchmark | |
23 | { | |
24 | public: | |
25 | ||
26 | AliHLTComponentBenchmark( const char *Name="" ); | |
27 | ~AliHLTComponentBenchmark(){} | |
28 | ||
29 | void Reset(); | |
30 | void SetName( const char *Name ); | |
31 | void SetTimer( Int_t i, const char *Name ); | |
32 | void StartNewEvent(); | |
33 | void Start( Int_t i ); | |
34 | void Stop( Int_t i ); | |
35 | void AddInput( Double_t x ); | |
36 | void AddOutput( Double_t x ); | |
37 | const char *GetStatistics(); | |
eb70c0fb | 38 | /** |
39 | * | |
40 | * returns satistics: | |
41 | * 0: number of events | |
42 | * 1: input file size per event | |
43 | * 2: output file size per event | |
44 | * 3: ratio output/input | |
45 | * 4+i: real time per event of counter i | |
46 | * 5+i: cpu time per event of counter i | |
47 | * | |
48 | **/ | |
49 | void GetStatisticsData(Double_t* statistics, TString* names); | |
57a4102f | 50 | |
51 | private: | |
52 | ||
53 | TString fComponentName;// name of the component | |
54 | Int_t fNTimers; // n of timers | |
55 | TStopwatch fTimers[10]; // the timers | |
56 | TString fNames[10]; // timer names | |
57 | ULong_t fNEvents; // N events processed | |
58 | Double_t fTotalRealTime[10]; // total real time | |
59 | Double_t fTotalCPUTime[10]; // total CPU time | |
60 | Double_t fTotalInput; // total input size | |
61 | Double_t fTotalOutput; // total output size | |
62 | TString fStatistics;// string with statistics | |
63 | }; | |
64 | ||
65 | #endif |