111 if (!strcmp(
name,(
const char*)
fNames[i]))
return i;
122 if (bench >= 0)
return fCpuTime[bench];
142 if (bench < 0)
return;
192 }
else if (bench >= 0) {
197 Warning(
"Start",
"too many benchmarks");
206 if (bench < 0)
return;
225 Printf(
"%-10s: Real Time = %6.2f seconds Cpu Time = %6.2f seconds",
"TOTAL",rt,cp);
This class is a ROOT utility to help benchmarking applications.
virtual void Print(Option_t *name="") const
Prints parameters of Benchmark name.
virtual void Reset()
Reset all Benchmarks.
virtual void Summary(Float_t &rt, Float_t &cp)
Prints a summary of all benchmarks.
TBenchmark()
Benchmark default constructor.
Int_t GetBench(const char *name) const
Returns index of Benchmark name.
virtual void Start(const char *name)
Starts Benchmark with the specified name.
TBenchmark & operator=(const TBenchmark &)
Assignment operator.
virtual void Stop(const char *name)
Terminates Benchmark with specified name.
virtual ~TBenchmark()
Benchmark destructor.
virtual void Show(const char *name)
Stops Benchmark name and Prints results.
Float_t GetCpuTime(const char *name)
Returns Cpu time used by Benchmark name.
Float_t GetRealTime(const char *name)
Returns Realtime used by Benchmark name.
The TNamed class is the base class for all named ROOT classes.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
Double_t CpuTime()
Stop the stopwatch (if it is running) and return the cputime (in seconds) passed between the start an...
void Continue()
Resume a stopped stopwatch.
void Stop()
Stop the stopwatch.