Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
benchmarks.C File Reference

Detailed Description

This macro run several tests and produces an benchmark report.

hsimple : Real Time = 0.08 seconds Cpu Time = 0.08 seconds
(TFile *) 0x555cbab8ff10
hsum : Real Time = 0.03 seconds Cpu Time = 0.03 seconds
Object statistics
class cnt on heap size total size heap size
================================================================================
TList 133 132 104 13832 13728
TObjectTable 1 1 32 32 32
TROOT 1 0 728 728 0
TPluginManager 1 1 40 40 40
THashTable 2 2 72 144 144
TClassTable 1 1 16 16 16
THashList 1 1 112 112 112
TEnv 1 1 56 56 56
TEnvRec 146 146 96 14016 14016
TNamed 1 1 64 64 64
TUnixSystem 1 1 672 672 672
TOrdCollection 4 4 72 288 288
--------------------------------------------------------------------------------
Total: 293 291 2064 30000 29168
================================================================================
fillrandom: Real Time = 0.14 seconds Cpu Time = 0.14 seconds
TFile** /home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master.build/tutorials/hsimple.root Demo ROOT file with histograms
TFile* /home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master.build/tutorials/hsimple.root Demo ROOT file with histograms
KEY: TH1F hpx;1 This is the px distribution
KEY: TH2F hpxpy;1 py vs px
KEY: TProfile hprof;1 Profile of pz versus px
KEY: TNtuple ntuple;1 Demo ntuple
i 0 0.000000 1.986693
i 1 0.100000 2.955202
i 2 0.200000 3.894183
i 3 0.300000 4.794255
i 4 0.400000 5.646425
i 5 0.500000 6.442177
i 6 0.600000 7.173561
i 7 0.700000 7.833269
i 8 0.800000 8.414710
i 9 0.900000 8.912074
i 10 1.000000 9.320391
i 11 1.100000 9.635582
i 12 1.200000 9.854497
i 13 1.300000 9.974950
i 14 1.400000 9.995736
i 15 1.500000 9.916648
i 16 1.600000 9.738476
i 17 1.700000 9.463001
i 18 1.800000 9.092974
i 19 1.900000 8.632094
tornado : Real Time = 0.00 seconds Cpu Time = 0.00 seconds
na49 : Real Time = 0.01 seconds Cpu Time = 0.01 seconds
geometry : Real Time = 0.03 seconds Cpu Time = 0.02 seconds
na49view : Real Time = 0.00 seconds Cpu Time = 0.00 seconds
---------------ROOT 6.35.01 benchmarks summary--------------------
hsimple : Real Time = 0.08 seconds Cpu Time = 0.08 seconds
hsum : Real Time = 0.03 seconds Cpu Time = 0.03 seconds
fillrandom: Real Time = 0.14 seconds Cpu Time = 0.14 seconds
tornado : Real Time = 0.00 seconds Cpu Time = 0.00 seconds
na49 : Real Time = 0.01 seconds Cpu Time = 0.01 seconds
geometry : Real Time = 0.03 seconds Cpu Time = 0.02 seconds
na49view : Real Time = 0.00 seconds Cpu Time = 0.00 seconds
TOTAL : Real Time = 0.30 seconds Cpu Time = 0.28 seconds
---------------ROOT 6.35.01 benchmarks summary (in ROOTMARKS)-----
For comparison, a Pentium IV 2.4Ghz is benchmarked at 600 ROOTMARKS
hsimple = 2054.62 RealMARKS, = 2100.00 CpuMARKS
hsum = 3330.80 RealMARKS, = 3000.00 CpuMARKS
fillrandom = 83.06 RealMARKS, = 42.86 CpuMARKS
tornado = 46380.07 RealMARKS, = inf CpuMARKS
na49 = 104509.86 RealMARKS, = 83400.00 CpuMARKS
geometry = 3808.75 RealMARKS, = 5400.00 CpuMARKS
na49view = 3906.93 RealMARKS, = inf CpuMARKS
****************************************************
* Your machine is estimated at 6907.06 ROOTMARKS *
****************************************************
TCanvas* bench1 = 0;
void bexec(TString &dir,const char *macro)
{
if (gROOT->IsBatch()) printf("Processing benchmark: %s%s\n",dir.Data(),macro);
TPaveText *summary = (TPaveText*)bench1->GetPrimitive("TPave");
TText *tmacro = summary->GetLineWith(macro);
if (tmacro) tmacro->SetTextColor(4);
bench1->Modified(); bench1->Update();
gROOT->Macro(Form("%s%s",dir.Data(),macro));
TPaveText *summary2 = (TPaveText*)bench1->GetPrimitive("TPave");
TText *tmacro2 = summary2->GetLineWith(macro);
if (tmacro2) tmacro2->SetTextColor(2);
bench1->Modified(); bench1->Update(); gSystem->ProcessEvents();
}
void benchmarks() {
TString dir = gSystem->UnixPathName(__FILE__);
dir.ReplaceAll("benchmarks.C","");
dir.ReplaceAll("/./","/");
dir.ReplaceAll("legacy","");
bench1 = new TCanvas("bench1","Benchmarks Summary",-1000,50,200,500);
TPaveText *summary = new TPaveText(0,0,1,1);
summary->SetTextAlign(12);
summary->SetTextSize(0.08);
summary->Draw();
summary->AddText(" graphics/framework.C");
summary->AddText(" hsimple.C");
summary->AddText(" hist/hsum.C");
summary->AddText(" graphics/formula1.C");
summary->AddText(" hist/fillrandom.C");
summary->AddText(" fit/fit1.C");
summary->AddText(" hist/h1ReadAndDraw.C");
summary->AddText(" graphs/graph.C");
summary->AddText(" graphs/gerrors.C");
summary->AddText(" graphics/tornado.C");
summary->AddText(" graphs/surfaces.C");
summary->AddText(" graphs/zdemo.C");
summary->AddText(" geom/geometry.C");
summary->AddText(" geom/na49view.C");
summary->AddText(" tree/ntuple1.C");
summary->AddText(" ");
bexec(dir,"graphics/framework.C");
bexec(dir,"hsimple.C");
bexec(dir,"hist/hsum.C");
bexec(dir,"graphics/formula1.C");
bexec(dir,"hist/fillrandom.C");
bexec(dir,"fit/fit1.C");
bexec(dir,"hist/h1ReadAndDraw.C");
bexec(dir,"graphs/graph.C");
bexec(dir,"graphs/gerrors.C");
bexec(dir,"graphics/tornado.C");
bexec(dir,"graphs/surfaces.C");
bexec(dir,"graphs/zdemo.C");
bexec(dir,"geom/geometry.C");
bexec(dir,"geom/na49view.C");
bexec(dir,"tree/ntuple1.C");
bexec(dir,"legacy/rootmarks.C");
}
#define gROOT
Definition TROOT.h:406
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2489
R__EXTERN TSystem * gSystem
Definition TSystem.h:561
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
Definition TAttText.h:42
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
Definition TAttText.h:44
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Definition TAttText.h:47
The Canvas class.
Definition TCanvas.h:23
void Update() override
Update canvas pad buffers.
Definition TCanvas.cxx:2489
void Modified(Bool_t flag=true) override
Mark pad modified Will be repainted when TCanvas::Update() will be called next time.
Definition TPad.cxx:7388
TObject * GetPrimitive(const char *name) const override
Get primitive.
Definition TPad.cxx:2983
A Pave (see TPave) with text, lines or/and boxes inside.
Definition TPaveText.h:21
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
void Draw(Option_t *option="") override
Draw this pavetext with its current attributes.
virtual TText * GetLineWith(const char *text) const
Get Pointer to first containing string text in this pavetext.
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition TString.h:704
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
Definition TSystem.cxx:1063
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition TSystem.cxx:416
Base class for several text objects.
Definition TText.h:22
Author
Rene Brun

Definition in file benchmarks.C.