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 *
8 //*************************************************************************
11 #ifndef ALIHLTCOMPONENTBENCHMARK_H
12 #define ALIHLTCOMPONENTBENCHMARK_H
14 #include "TStopwatch.h"
18 * @class AliHLTComponentBenchmark
20 * AliHLTComponentBenchmark can be used to benchmark HLT compnoents
22 class AliHLTComponentBenchmark
26 AliHLTComponentBenchmark( const char *Name="" );
27 ~AliHLTComponentBenchmark(){}
30 void SetName( const char *Name );
31 void SetTimer( Int_t i, const char *Name );
33 void Start( Int_t i );
35 void AddInput( Double_t x );
36 void AddOutput( Double_t x );
37 const char *GetStatistics();
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
49 void GetStatisticsData(Double_t* statistics, TString* names);
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