forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrootmarks.C
More file actions
151 lines (138 loc) · 5.06 KB
/
Copy pathrootmarks.C
File metadata and controls
151 lines (138 loc) · 5.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/// \file
/// \ingroup Tutorials
/// Prints a summary of all ROOT benchmarks (must be run before).
/// The ROOTMARK number printed is by reference to a Pentium IV 2.4 Ghz
/// (with 512 MBytes memory and 120 GBytes IDE disk)
/// taken by definition as 600 ROOTMARKS in batch mode in executing
///
/// root -b -q benchmarks.C
///
/// \macro_code
///
/// \author Rene Brun
void rootmarks() {
Float_t rtall = 0;
Float_t cpall = 0;
Float_t norml = 600;
Float_t rtmark,cpmark;
Bool_t batch = gROOT->IsBatch();
printf("---------------ROOT %s benchmarks summary--------------------\n",gROOT->GetVersion());
gBenchmark->Summary(rtall,cpall);
printf("\n---------------ROOT %s benchmarks summary (in ROOTMARKS)-----\n",gROOT->GetVersion());
printf(" For comparison, a Pentium IV 2.4Ghz is benchmarked at 600 ROOTMARKS\n");
Float_t hsimple_rt = gBenchmark->GetRealTime("hsimple");
Float_t hsimple_ct = gBenchmark->GetCpuTime("hsimple");
if (hsimple_rt > 0) {
if (batch) {
rtmark = norml*(0.29/hsimple_rt);
cpmark = norml*(0.28/hsimple_ct);
} else {
rtmark = norml*(0.99/hsimple_rt);
cpmark = norml*(0.43/hsimple_ct);
}
printf("hsimple = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
}
Float_t hsum_rt = gBenchmark->GetRealTime("hsum");
Float_t hsum_ct = gBenchmark->GetCpuTime("hsum");
if (hsum_rt > 0) {
if (batch) {
rtmark = norml*(0.16/hsum_rt);
cpmark = norml*(0.15/hsum_ct);
} else {
rtmark = norml*(0.99/hsum_rt);
cpmark = norml*(0.24/hsum_ct);
}
printf("hsum = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
}
Float_t fillrandom_rt = gBenchmark->GetRealTime("fillrandom");
Float_t fillrandom_ct = gBenchmark->GetCpuTime("fillrandom");
if (fillrandom_rt > 0) {
if (batch) {
rtmark = norml*(0.02/fillrandom_rt);
cpmark = norml*(0.01/fillrandom_ct);
} else {
rtmark = norml*(0.48/fillrandom_rt);
cpmark = norml*(0.04/fillrandom_ct);
}
printf("fillrandom = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
}
Float_t fit1_rt = gBenchmark->GetRealTime("fit1");
Float_t fit1_ct = gBenchmark->GetCpuTime("fit1");
if (fit1_rt > 0) {
if (batch) {
rtmark = norml*(0.04/fit1_rt);
cpmark = norml*(0.03/fit1_ct);
} else {
rtmark = norml*(0.13/fit1_rt);
cpmark = norml*(0.03/fit1_ct);
}
printf("fit1 = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
}
Float_t tornado_rt = gBenchmark->GetRealTime("tornado");
Float_t tornado_ct = gBenchmark->GetCpuTime("tornado");
if (tornado_rt > 0) {
if (batch) {
rtmark = norml*(0.05/tornado_rt);
cpmark = norml*(0.04/tornado_ct);
} else {
rtmark = norml*(0.11/tornado_rt);
cpmark = norml*(0.03/tornado_ct);
}
printf("tornado = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
}
Float_t na49_rt = gBenchmark->GetRealTime("na49");
Float_t na49_ct = gBenchmark->GetCpuTime("na49");
if (na49_rt > 0) {
rtmark = norml*(1.39/na49_rt);
cpmark = norml*(1.39/na49_ct);
printf("na49 = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
}
Float_t geometry_rt = gBenchmark->GetRealTime("geometry");
Float_t geometry_ct = gBenchmark->GetCpuTime("geometry");
if (geometry_rt > 0) {
rtmark = norml*(0.19/geometry_rt);
cpmark = norml*(0.18/geometry_ct);
printf("geometry = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
}
Float_t na49view_rt = gBenchmark->GetRealTime("na49view");
Float_t na49view_ct = gBenchmark->GetCpuTime("na49view");
if (na49view_rt > 0) {
if (batch) {
rtmark = norml*(0.03/na49view_rt);
cpmark = norml*(0.03/na49view_ct);
} else {
rtmark = norml*(0.33/na49view_rt);
cpmark = norml*(0.05/na49view_ct);
}
printf("na49view = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
}
Float_t ntuple1_rt = gBenchmark->GetRealTime("ntuple1");
Float_t ntuple1_ct = gBenchmark->GetCpuTime("ntuple1");
if (ntuple1_rt > 0) {
if (batch) {
rtmark = norml*(0.29/ntuple1_rt);
cpmark = norml*(0.27/ntuple1_ct);
} else {
rtmark = norml*(1.79/ntuple1_rt);
cpmark = norml*(0.28/ntuple1_ct);
}
printf("ntuple1 = %7.2f RealMARKS, = %7.2f CpuMARKS\n",rtmark,cpmark);
}
if (rtall) {
Float_t rtbrun, cpbrun;
if (batch) {
rtbrun = 3.45;
cpbrun = 3.24;
} else {
rtbrun = 5.79;
cpbrun = 4.08;
}
Float_t rootmarks = norml*(rtbrun+cpbrun)/(rtall+cpall);
printf("\n");
printf("****************************************************\n");
printf("* Your machine is estimated at %7.2f ROOTMARKS *\n",rootmarks);
printf("****************************************************\n");
} else {
printf(" You must run the ROOT benchmarks before executing this command\n");
}
}