109 if (!strcmp(
name,(
const char*)
fNames[i]))
return i;
120 if (bench >= 0)
return fCpuTime[bench];
140 if (bench < 0)
return;
190 }
else if (bench >= 0) {
195 Warning(
"Start",
"too many benchmarks");
204 if (bench < 0)
return;
223 Printf(
"%-10s: Real Time = %6.2f seconds Cpu Time = %6.2f seconds",
"TOTAL",rt,cp);
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
This class is a ROOT utility to help benchmarking applications.
void Print(Option_t *name="") const override
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.