ROOT logo
// @(#)root/base:$Id: TBenchmark.h 20877 2007-11-19 11:17:07Z rdm $
// Author: Rene Brun   12/12/94

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/
// ---------------------------------- Benchmark.h

#ifndef ROOT_TBenchmark
#define ROOT_TBenchmark



//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TBenchmark                                                           //
//                                                                      //
// This class is a ROOT utility to help benchmarking applications       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TStopwatch
#include "TStopwatch.h"
#endif

class TBenchmark : public TNamed {

protected:

   Int_t      fNbench;          // Number of active benchmarks
   Int_t      fNmax;            // Maximum number of benchmarks initialized
   TString    *fNames;          //[fNbench] Names of benchmarks
   Float_t    *fRealTime;       //[fNbench] Real Time
   Float_t    *fCpuTime;        //[fNbench] Cpu Time
   TStopwatch *fTimer;          // Timers

   TBenchmark(const TBenchmark&);
   TBenchmark& operator=(const TBenchmark&);

public:
   TBenchmark();
   virtual            ~TBenchmark();
   Int_t              GetBench(const char *name) const;
   Float_t            GetCpuTime(const char *name);
   Float_t            GetRealTime(const char *name);
   virtual void       Print(Option_t *name="") const;
   virtual void       Reset();
   virtual void       Show(const char *name);
   virtual void       Start(const char *name);
   virtual void       Stop(const char *name);
   virtual void       Summary(Float_t &rt, Float_t &cp);

   ClassDef(TBenchmark,0)  //ROOT utility to help benchmarking applications
};

R__EXTERN TBenchmark  *gBenchmark;

#endif
 TBenchmark.h:1
 TBenchmark.h:2
 TBenchmark.h:3
 TBenchmark.h:4
 TBenchmark.h:5
 TBenchmark.h:6
 TBenchmark.h:7
 TBenchmark.h:8
 TBenchmark.h:9
 TBenchmark.h:10
 TBenchmark.h:11
 TBenchmark.h:12
 TBenchmark.h:13
 TBenchmark.h:14
 TBenchmark.h:15
 TBenchmark.h:16
 TBenchmark.h:17
 TBenchmark.h:18
 TBenchmark.h:19
 TBenchmark.h:20
 TBenchmark.h:21
 TBenchmark.h:22
 TBenchmark.h:23
 TBenchmark.h:24
 TBenchmark.h:25
 TBenchmark.h:26
 TBenchmark.h:27
 TBenchmark.h:28
 TBenchmark.h:29
 TBenchmark.h:30
 TBenchmark.h:31
 TBenchmark.h:32
 TBenchmark.h:33
 TBenchmark.h:34
 TBenchmark.h:35
 TBenchmark.h:36
 TBenchmark.h:37
 TBenchmark.h:38
 TBenchmark.h:39
 TBenchmark.h:40
 TBenchmark.h:41
 TBenchmark.h:42
 TBenchmark.h:43
 TBenchmark.h:44
 TBenchmark.h:45
 TBenchmark.h:46
 TBenchmark.h:47
 TBenchmark.h:48
 TBenchmark.h:49
 TBenchmark.h:50
 TBenchmark.h:51
 TBenchmark.h:52
 TBenchmark.h:53
 TBenchmark.h:54
 TBenchmark.h:55
 TBenchmark.h:56
 TBenchmark.h:57
 TBenchmark.h:58
 TBenchmark.h:59
 TBenchmark.h:60
 TBenchmark.h:61
 TBenchmark.h:62
 TBenchmark.h:63
 TBenchmark.h:64
 TBenchmark.h:65