ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rootmarks.C
Go to the documentation of this file.
1 void rootmarks() {
2 // Prints a summary of all ROOT benchmarks (must be run before)
3 // The ROOTMARK number printed is by reference to a Pentium IV 2.4 Ghz
4 // (with 512 MBytes memory and 120 GBytes IDE disk)
5 // taken by definition as 600 ROOTMARKS in batch mode in executing
6 // root -b -q benchmarks.C
7 //
8 
9  Float_t rtall = 0;
10  Float_t cpall = 0;
11  Float_t norml = 600;
12  Float_t rtmark,cpmark;
13  Bool_t batch = gROOT->IsBatch();
14 
15  printf("---------------ROOT %s benchmarks summary--------------------\n",gROOT->GetVersion());
16  gBenchmark->Summary(rtall,cpall);
17  printf("\n---------------ROOT %s benchmarks summary (in ROOTMARKS)-----\n",gROOT->GetVersion());
18  printf(" For comparison, a Pentium IV 2.4Ghz is benchmarked at 600 ROOTMARKS\n");
19  Float_t hsimple_rt = gBenchmark->GetRealTime("hsimple");
20  Float_t hsimple_ct = gBenchmark->GetCpuTime("hsimple");
21  if (hsimple_rt > 0) {
22  if (batch) {
23  rtmark = norml*(0.29/hsimple_rt);
24  cpmark = norml*(0.28/hsimple_ct);
25  } else {
26  rtmark = norml*(0.99/hsimple_rt);
27  cpmark = norml*(0.43/hsimple_ct);
28  }
29  printf("hsimple = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
30  }
31 
32  Float_t hsum_rt = gBenchmark->GetRealTime("hsum");
33  Float_t hsum_ct = gBenchmark->GetCpuTime("hsum");
34  if (hsum_rt > 0) {
35  if (batch) {
36  rtmark = norml*(0.16/hsum_rt);
37  cpmark = norml*(0.15/hsum_ct);
38  } else {
39  rtmark = norml*(0.99/hsum_rt);
40  cpmark = norml*(0.24/hsum_ct);
41  }
42  printf("hsum = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
43  }
44 
45  Float_t fillrandom_rt = gBenchmark->GetRealTime("fillrandom");
46  Float_t fillrandom_ct = gBenchmark->GetCpuTime("fillrandom");
47  if (fillrandom_rt > 0) {
48  if (batch) {
49  rtmark = norml*(0.02/fillrandom_rt);
50  cpmark = norml*(0.01/fillrandom_ct);
51  } else {
52  rtmark = norml*(0.48/fillrandom_rt);
53  cpmark = norml*(0.04/fillrandom_ct);
54  }
55  printf("fillrandom = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
56  }
57 
58  Float_t fit1_rt = gBenchmark->GetRealTime("fit1");
59  Float_t fit1_ct = gBenchmark->GetCpuTime("fit1");
60  if (fit1_rt > 0) {
61  if (batch) {
62  rtmark = norml*(0.04/fit1_rt);
63  cpmark = norml*(0.03/fit1_ct);
64  } else {
65  rtmark = norml*(0.13/fit1_rt);
66  cpmark = norml*(0.03/fit1_ct);
67  }
68  printf("fit1 = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
69  }
70 
71  Float_t tornado_rt = gBenchmark->GetRealTime("tornado");
72  Float_t tornado_ct = gBenchmark->GetCpuTime("tornado");
73  if (tornado_rt > 0) {
74  if (batch) {
75  rtmark = norml*(0.05/tornado_rt);
76  cpmark = norml*(0.04/tornado_ct);
77  } else {
78  rtmark = norml*(0.11/tornado_rt);
79  cpmark = norml*(0.03/tornado_ct);
80  }
81  printf("tornado = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
82  }
83 
84  Float_t na49_rt = gBenchmark->GetRealTime("na49");
85  Float_t na49_ct = gBenchmark->GetCpuTime("na49");
86  if (na49_rt > 0) {
87  rtmark = norml*(1.39/na49_rt);
88  cpmark = norml*(1.39/na49_ct);
89  printf("na49 = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
90  }
91 
92  Float_t geometry_rt = gBenchmark->GetRealTime("geometry");
93  Float_t geometry_ct = gBenchmark->GetCpuTime("geometry");
94  if (geometry_rt > 0) {
95  rtmark = norml*(0.19/geometry_rt);
96  cpmark = norml*(0.18/geometry_ct);
97  printf("geometry = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
98  }
99 
100  Float_t na49view_rt = gBenchmark->GetRealTime("na49view");
101  Float_t na49view_ct = gBenchmark->GetCpuTime("na49view");
102  if (na49view_rt > 0) {
103  if (batch) {
104  rtmark = norml*(0.03/na49view_rt);
105  cpmark = norml*(0.03/na49view_ct);
106  } else {
107  rtmark = norml*(0.33/na49view_rt);
108  cpmark = norml*(0.05/na49view_ct);
109  }
110  printf("na49view = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
111  }
112 
113  Float_t ntuple1_rt = gBenchmark->GetRealTime("ntuple1");
114  Float_t ntuple1_ct = gBenchmark->GetCpuTime("ntuple1");
115  if (ntuple1_rt > 0) {
116  if (batch) {
117  rtmark = norml*(0.29/ntuple1_rt);
118  cpmark = norml*(0.27/ntuple1_ct);
119  } else {
120  rtmark = norml*(1.79/ntuple1_rt);
121  cpmark = norml*(0.28/ntuple1_ct);
122  }
123  printf("ntuple1 = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
124  }
125 
126  if (rtall) {
127  Float_t rtbrun, cpbrun;
128  if (batch) {
129  rtbrun = 3.45;
130  cpbrun = 3.24;
131  } else {
132  rtbrun = 5.79;
133  cpbrun = 4.08;
134  }
135  Float_t rootmarks = norml*(rtbrun+cpbrun)/(rtall+cpall);
136  printf("\n");
137  printf("****************************************************\n");
138  printf("* Your machine is estimated at %7.2f ROOTMARKS *\n",rootmarks);
139  printf("****************************************************\n");
140  } else {
141  printf(" You must run the ROOT benchmarks before executing this command\n");
142  }
143 }
float Float_t
Definition: RtypesCore.h:53
#define gROOT
Definition: TROOT.h:344
bool Bool_t
Definition: RtypesCore.h:59
Float_t GetCpuTime(const char *name)
Returns Cpu time used by Benchmark name.
Definition: TBenchmark.cxx:117
Float_t GetRealTime(const char *name)
Returns Realtime used by Benchmark name.
Definition: TBenchmark.cxx:127
R__EXTERN TBenchmark * gBenchmark
Definition: TBenchmark.h:63
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void rootmarks()
Definition: rootmarks.C:1
virtual void Summary(Float_t &rt, Float_t &cp)
Prints a summary of all benchmarks.
Definition: TBenchmark.cxx:214