Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TProofBenchRunCPU.cxx
Go to the documentation of this file.
1// @(#)root/proof:$Id$
2// Author: Sangsu Ryu 22/06/2010
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TProofBenchRunCPU
13\ingroup proofbench
14
15CPU-intensive PROOF benchmark test generates events and fill 1, 2, or 3-D histograms.
16No I/O activity is involved.
17
18*/
19
20#include "RConfigure.h"
21
22#include "TProofBenchRunCPU.h"
23#include "TProofNodes.h"
24#include "TProofPerfAnalysis.h"
25#include "TFileCollection.h"
26#include "TFileInfo.h"
27#include "TProof.h"
28#include "TString.h"
29#include "Riostream.h"
30#include "TMap.h"
31#include "TEnv.h"
32#include "TTree.h"
33#include "TLeaf.h"
34#include "TCanvas.h"
35#include "TROOT.h"
36#include "TH2.h"
37#include "TF1.h"
38#include "TProfile.h"
39#include "TLegend.h"
40#include "TKey.h"
41#include "TRegexp.h"
42#include "TPerfStats.h"
43#include "TQueryResult.h"
44#include "TMath.h"
45#include "TStyle.h"
46#include "TGraphErrors.h"
47
49
50////////////////////////////////////////////////////////////////////////////////
51/// Default constructor
52
54 TDirectory* dirproofbench, TProof* proof,
55 TProofNodes* nodes, Long64_t nevents, Int_t ntries,
56 Int_t start, Int_t stop, Int_t step, Int_t draw,
57 Int_t debug)
59 fHistType(histtype), fNHists(nhists),
60 fNEvents(nevents), fNTries(ntries), fStart(start), fStop(stop),
61 fStep(step), fDraw(draw), fDebug(debug), fDirProofBench(dirproofbench),
62 fNodes(nodes), fListPerfPlots(0),
63 fCanvas(0), fProfile_perfstat_event(0), fHist_perfstat_event(0),
64 fProfile_perfstat_evtmax(0), fNorm_perfstat_evtmax(0),
65 fProfile_queryresult_event(0), fNorm_queryresult_event(0), fProfile_cpu_eff(0),
66 fProfLegend(0), fNormLegend(0), fName(0)
67{
69 Error("TProofBenchRunCPU", "problems validating PROOF session or enabling selector PAR");
70 return;
71 }
72
73 fName = "CPU";
74
75 if (!fNodes) fNodes = new TProofNodes(fProof);
76
77 if (stop == -1) fStop = fNodes->GetNWorkersCluster();
78
80
81 gEnv->SetValue("Proof.StatsTrace",1);
83}
84
85////////////////////////////////////////////////////////////////////////////////
86/// Destructor
87
89{
90 fProof=0;
97}
98
99////////////////////////////////////////////////////////////////////////////////
100/// Build histograms, profiles and graphs needed for this run
101
103{
104 TObject *o = 0;
105 Int_t quotient = (stop - start) / step;
106 Int_t ndiv = quotient + 1;
107 Double_t ns_min = start - step/2.;
108 Double_t ns_max = quotient*step + start + step/2.;
109
110 fProfLegend = new TLegend(0.1, 0.8, 0.3, 0.9);
111 fNormLegend = new TLegend(0.7, 0.8, 0.9, 0.9);
112
113 TString axtitle("Active Workers"), namelab(GetName()), sellab(GetSelName());
114 if (nx) {
115 axtitle = "Active Workers/Node";
116 namelab.Form("x_%s", GetName());
117 }
119 sellab.Form("%s_%s", GetSelName(), GetNameStem().Data());
120
121 TString name, title;
122
123 // Book perfstat profile (max evts)
124 name.Form("Prof_%s_PS_MaxEvts_%s", namelab.Data(), sellab.Data());
125 title.Form("Profile %s PerfStat Event - %s", namelab.Data(), sellab.Data());
126 fProfile_perfstat_evtmax = new TProfile(name, title, ndiv, ns_min, ns_max);
132 if ((o = fListPerfPlots->FindObject(name))) {
134 delete o;
135 }
138
139 // Book perfstat profile
140 name.Form("Prof_%s_PS_Evts_%s", namelab.Data(), sellab.Data());
141 title.Form("Profile %s PerfStat Event - %s", namelab.Data(), sellab.Data());
142 fProfile_perfstat_event = new TProfile(name, title, ndiv, ns_min, ns_max);
144 fProfile_perfstat_event->GetYaxis()->SetTitle("Events/sec");
147 if ((o = fListPerfPlots->FindObject(name))) {
149 delete o;
150 }
153
154 // Book perfstat histogram
155 name.Form("Hist_%s_PS_Evts_%s", namelab.Data(), sellab.Data());
156 title.Form("Histogram %s PerfStat Event - %s", namelab.Data(), sellab.Data());
157 fHist_perfstat_event = new TH2D(name, title, ndiv, ns_min, ns_max, 100, 0, 0);
159 fHist_perfstat_event->GetYaxis()->SetTitle("Events/sec");
162 if ((o = fListPerfPlots->FindObject(name))) {
164 delete o;
165 }
167
168 // Book normalized perfstat profile (max evts)
169 name.Form("Norm_%s_PS_MaxEvts_%s", namelab.Data(), sellab.Data());
170 title.Form("Profile %s Normalized PerfStat Event - %s", namelab.Data(), sellab.Data());
171 fNorm_perfstat_evtmax = new TProfile(name, title, ndiv, ns_min, ns_max);
173 fNorm_perfstat_evtmax->GetYaxis()->SetTitle("Events/sec");
177 if ((o = fListPerfPlots->FindObject(name))) {
179 delete o;
180 }
183
184 // Book queryresult profile
185 name.Form("Prof_%s_QR_Evts_%s", namelab.Data(), sellab.Data());
186 title.Form("Profile %s QueryResult Event - %s", namelab.Data(), sellab.Data());
187 fProfile_queryresult_event = new TProfile(name, title, ndiv, ns_min, ns_max);
192 if ((o = fListPerfPlots->FindObject(name))) {
194 delete o;
195 }
197
198 // Book normalized queryresult profile
199 name.Form("Norm_%s_QR_Evts_%s", namelab.Data(), sellab.Data());
200 title.Form("Profile %s Normalized QueryResult Event - %s", namelab.Data(), sellab.Data());
201 fNorm_queryresult_event = new TProfile(name, title, ndiv, ns_min, ns_max);
203 fNorm_queryresult_event->GetYaxis()->SetTitle("Events/sec");
206 if ((o = fListPerfPlots->FindObject(name))) {
208 delete o;
209 }
212
213 // Book CPU efficiency profile
214 name.Form("Prof_%s_CPU_eff_%s", namelab.Data(), sellab.Data());
215 title.Form("Profile %s CPU efficiency - %s", namelab.Data(), sellab.Data());
216 fProfile_cpu_eff = new TProfile(name, title, ndiv, ns_min, ns_max);
218 fProfile_cpu_eff->GetYaxis()->SetTitle("Efficiency");
221 if ((o = fListPerfPlots->FindObject(name))) {
223 delete o;
224 }
226}
227
228////////////////////////////////////////////////////////////////////////////////
229/// Run benchmark
230/// Input parameters
231/// nevents: Number of events to run per file. When it is -1, use data member fNEvents.
232/// start: Start scan with 'start' workers. When it is -1, use data member fStart.
233/// When 0, the same number of workers are activated on all nodes.
234/// stop: Stop scan at 'stop' workers. When it is -1 , use data member fStop.
235/// step: Scan every 'step' workers. When it is -1, use data member fStep.
236/// ntries: Number of repetitions. When it is -1, use data member fNTries.
237/// debug: debug switch. When it is -1, use data member fDebug.
238/// draw: draw switch. When it is -1, use data member fDraw.
239/// Returns
240/// Nothing
241
242void TProofBenchRunCPU::Run(Long64_t nevents, Int_t start, Int_t stop,
243 Int_t step, Int_t ntries, Int_t debug, Int_t draw)
244{
245 if (!fProof){
246 Error("Run", "Proof not set");
247 return;
248 }
249
250 nevents = (nevents == -1) ? fNEvents : nevents;
251 start = (start == -1) ? fStart : start;
252 stop = (stop == -1) ? fStop : stop;
253 step = (step == -1) ? fStep : step;
254 ntries = (ntries == -1) ? fNTries : ntries;
255 debug = (debug == -1) ? fDebug : debug;
256 draw = (draw == -1) ? fDraw : draw;
257
258 Bool_t nx = kFALSE;
259 if (step == -2){
260 nx = kTRUE;
261 start = fStart;
262 step = 1;
263 }
264
265 if (nx){
266 Int_t minnworkersanode = fNodes->GetMinWrksPerNode();
267 if (stop > minnworkersanode) stop = minnworkersanode;
268 }
269
270 // Load the selector, if needed
272 // Is it the default selector?
274 // Load the parfile
276 Info("Run", "Uploading '%s' ...", par.Data());
277 if (fProof->UploadPackage(par) != 0) {
278 Error("Run", "problems uploading '%s' - cannot continue", par.Data());
279 return;
280 }
281 Info("Run", "Enabling '%s' ...", kPROOF_BenchCPUSelPar);
283 Error("Run", "problems enabling '%s' - cannot continue", kPROOF_BenchCPUSelPar);
284 return;
285 }
286 } else {
287 if (fParList.IsNull()) {
288 Error("Run", "you should load the class '%s' before running the benchmark", fSelName.Data());
289 return;
290 } else {
291 TString par;
292 Int_t from = 0;
293 while (fParList.Tokenize(par, from, ",")) {
294 Info("Run", "Uploading '%s' ...", par.Data());
295 if (fProof->UploadPackage(par) != 0) {
296 Error("Run", "problems uploading '%s' - cannot continue", par.Data());
297 return;
298 }
299 Info("Run", "Enabling '%s' ...", par.Data());
300 if (fProof->EnablePackage(par) != 0) {
301 Error("Run", "problems enabling '%s' - cannot continue", par.Data());
302 return;
303 }
304 }
305 }
306 }
307 // Check
309 Error("Run", "failed to load '%s'", fSelName.Data());
310 return;
311 }
312 }
313
314 // Build histograms, profiles and graphs needed for this run
315 BuildHistos(start, stop, step, nx);
316
317 // Get pad
318 if (!fCanvas) fCanvas = new TCanvas("Canvas");
319 // Cleanup up the canvas
320 fCanvas->Clear();
321
322 // Divide the canvas as many as the number of profiles in the list
323 fCanvas->Divide(2,1);
324
325 TString perfstats_name = "PROOF_PerfStats";
326
328
329 if (nx){
330 Info("Run", "Running CPU-bound tests; %d ~ %d active worker(s)/node,"
331 " every %d worker(s)/node.", start, stop, step);
332 } else {
333 Info("Run", "Running CPU-bound tests; %d ~ %d active worker(s),"
334 " every %d worker(s).", start, stop, step);
335 }
336
337 Int_t npad = 1; //pad number
338
339 Int_t nnodes = fNodes->GetNNodes(); // Number of machines
340 Int_t ncores = fNodes->GetNCores(); // Number of cores
341
342 Double_t ymi = -1., ymx = -1., emx = -1.;
343 for (Int_t nactive = start; nactive <= stop; nactive += step) {
344
345 // For CPU effectiveness (ok for lite; should do it properly for standard clusters)
346 Int_t ncoren = (nactive < ncores) ? nactive : ncores;
347
348 // Actvate the wanted workers
349 Int_t nw = -1;
350 if (nx) {
351 TString workers;
352 workers.Form("%dx", nactive);
353 nw = fNodes->ActivateWorkers(workers);
354 } else {
355 nw = fNodes->ActivateWorkers(nactive);
356 }
357 if (nw < 0){
358 Error("Run", "could not activate the requested number of"
359 " workers/node on the cluster; skipping the test point"
360 " (%d workers/node)", nactive);
361 continue;
362 }
363
364 for (Int_t j = 0; j < ntries; j++) {
365
366 if (nx){
367 Info("Run", "Running CPU-bound tests with %d active worker(s)/node;"
368 " trial %d/%d", nactive, j + 1, ntries);
369 } else {
370 Info("Run", "Running CPU-bound tests with %d active worker(s);"
371 " trial %d/%d", nactive, j + 1, ntries);
372 }
373
374 Int_t nevents_all=0;
375 if (nx){
376 nevents_all=nevents*nactive*nnodes;
377 } else {
378 nevents_all=nevents*nactive;
379 }
380
381 // Process
382 fProof->Process(fSelName, nevents_all, fSelOption);
383
385
386 // Save perfstats
387 TTree *t = 0;
388 if (l) t = dynamic_cast<TTree*>(l->FindObject(perfstats_name.Data()));
389 if (t) {
390
391 //FillPerfStatPerfPlots(t, profile_perfstat_event, nactive);
392 FillPerfStatPerfPlots(t, nactive);
393
394 TProofPerfAnalysis pfa(t);
395 Double_t pf_eventrate = pfa.GetEvtRateAvgMax();
396// if (pf_eventrate > emx) emx = pf_eventrate;
397 fProfile_perfstat_evtmax->Fill(nactive, pf_eventrate);
398 fCanvas->cd(npad);
402 fProfLegend->Draw();
403 gPad->Update();
404 // The normalised histos
405 // Use the first bin to set the Y range for the histo
406 Double_t nert = nx ? pf_eventrate/nactive/nnodes : pf_eventrate/nactive;
407 fNorm_perfstat_evtmax->Fill(nactive, nert);
410 Double_t dy = 5 * e1;
411 if (dy / y1 < 0.2) dy = y1 * 0.2;
412 if (dy > y1) dy = y1*.999999;
413 if (ymi < 0.) ymi = y1 - dy;
414 if (fNorm_perfstat_evtmax->GetBinContent(nactive) < ymi)
415 ymi = fNorm_perfstat_evtmax->GetBinContent(nactive) / 2.;
416 if (ymx < 0.) ymx = y1 + dy;
417 if (fNorm_perfstat_evtmax->GetBinContent(nactive) > ymx)
418 ymx = fNorm_perfstat_evtmax->GetBinContent(nactive) * 1.5;
421 fCanvas->cd(npad + 1);
423 fNormLegend->Draw();
424 gPad->Update();
425
426 // Build up new name
427 TString newname = TString::Format("%s_%s_%dwrks%dthtry", t->GetName(), GetName(), nactive, j);
428 t->SetName(newname);
429
430 if (debug && fDirProofBench->IsWritable()){
431 TDirectory *curdir = gDirectory;
432 TString dirn = nx ? "RunCPUx" : "RunCPU";
433 if (!fDirProofBench->GetDirectory(dirn))
434 fDirProofBench->mkdir(dirn, "RunCPU results");
435 if (fDirProofBench->cd(dirn)) {
437 t->Write();
438 l->Remove(t);
439 } else {
440 Warning("Run", "cannot cd to subdirectory '%s' to store the results!", dirn.Data());
441 }
442 curdir->cd();
443 }
444
445 } else {
446 if (l)
447 Warning("Run", "%s: tree not found", perfstats_name.Data());
448 else
449 Error("Run", "PROOF output list is empty!");
450 }
451
452 // Performance measures from TQueryResult
453
454 const char *drawopt = t ? "LSAME" : "L";
455 TQueryResult *queryresult = fProof->GetQueryResult();
456 if (queryresult) {
457 queryresult->Print("F");
458 TDatime qr_start = queryresult->GetStartTime();
459 TDatime qr_end = queryresult->GetEndTime();
460 Float_t qr_proc = queryresult->GetProcTime();
461
462 Long64_t qr_entries = queryresult->GetEntries();
463
464 // Calculate event rate
465 Double_t qr_eventrate = qr_entries / Double_t(qr_proc);
466 if (qr_eventrate > emx) emx = qr_eventrate;
467
468 // Calculate and fill CPU efficiency
469 Float_t qr_cpu_eff = -1.;
470 if (qr_proc > 0.) {
471 qr_cpu_eff = queryresult->GetUsedCPU() / ncoren / qr_proc ;
472 fProfile_cpu_eff->Fill(nactive, qr_cpu_eff);
473 Printf("cpu_eff: %f", qr_cpu_eff);
474 }
475
476 // Fill and draw
477 fProfile_queryresult_event->Fill(nactive, qr_eventrate);
478 fCanvas->cd(npad);
480 fProfLegend->Draw();
481 gPad->Update();
482 // The normalised histo
483 Double_t nert = nx ? qr_eventrate/nactive/nnodes : qr_eventrate/nactive;
484 fNorm_queryresult_event->Fill(nactive, nert);
485 // Use the first bin to set the Y range for the histo
488 Double_t dy = 5 * e1;
489 if (dy / y1 < 0.2) dy = y1 * 0.2;
490 if (dy > y1) dy = y1*.999999;
491 if (ymi < 0.) ymi = y1 - dy;
492 if (fNorm_queryresult_event->GetBinContent(nactive) < ymi)
493 ymi = fNorm_queryresult_event->GetBinContent(nactive) / 2.;
494 if (ymx < 0.) ymx = y1 + dy;
495 if (fNorm_queryresult_event->GetBinContent(nactive) > ymx)
496 ymx = fNorm_queryresult_event->GetBinContent(nactive) * 1.5;
498// fNorm_queryresult_event->SetMinimum(ymi);
500 fCanvas->cd(npad+1);
502 fNormLegend->Draw();
503 } else {
504 Warning("Run", "TQueryResult not found!");
505 }
506 gPad->Update();
507
508 } // for iterations
509 } // for number of workers
510
511 // Make the result persistent
512 fCanvas->cd(npad);
516 fProfLegend->Draw();
517 fCanvas->cd(npad + 1);
520 fNormLegend->Draw();
521 gPad->Update();
522
523 //save performance profiles to file
525 TDirectory *curdir = gDirectory;
526 TString dirn = nx ? "RunCPUx" : "RunCPU";
527 if (!fDirProofBench->GetDirectory(dirn))
528 fDirProofBench->mkdir(dirn, "RunCPU results");
529 if (fDirProofBench->cd(dirn)) {
533 } else {
534 Warning("Run", "cannot cd to subdirectory '%s' to store the results!", dirn.Data());
535 }
536 curdir->cd();
537 }
538}
539
540////////////////////////////////////////////////////////////////////////////////
541
543{
544 // Fill performance profiles using tree 't'(PROOF_PerfStats).
545 // Input parameters
546 // t: Proof output tree (PROOF_PerfStat) containing performance statistics.
547 // profile: Profile to be filled up with information from tree 't'.
548 // nactive: Number of active workers processed the query.
549 // Return
550 // Nothing
551
552 // find perfstat profile
554 Error("FillPerfStatPerfPlots", "no perfstat profile found");
555 return;
556 }
557
558 // find perfstat histogram
560 Error("FillPerfStatPerfPlots", "no perfstat histogram found");
561 return;
562 }
563
564 // extract timing information
565 TPerfEvent pe;
566 TPerfEvent* pep = &pe;
567 t->SetBranchAddress("PerfEvents",&pep);
568 Long64_t entries = t->GetEntries();
569
570 Double_t event_rate_packet = 0;
571
572 for (Long64_t k=0; k<entries; k++) {
573
574 t->GetEntry(k);
575
576 // Skip information from workers
577 if (pe.fEvtNode.Contains(".")) continue;
578
580 if (pe.fProcTime != 0.0) {
581 event_rate_packet = pe.fEventsProcessed / pe.fProcTime;
582 fHist_perfstat_event->Fill(Double_t(nactive), event_rate_packet);
583 }
584 }
585 }
586
587 return;
588}
589
590////////////////////////////////////////////////////////////////////////////////
591/// Show settings
592
594{
595 Printf("+++ TProofBenchRunCPU +++++++++++++++++++++++++++++++++++++++++");
596 Printf("Name = %s", fName.Data());
597 if (fProof) fProof->Print(option);
598 Printf("fHistType = k%s", GetNameStem().Data());
599 Printf("fNHists = %d", fNHists);
600 Printf("fNEvents = %lld", fNEvents);
601 Printf("fNTries = %d", fNTries);
602 Printf("fStart = %d", fStart);
603 Printf("fStop = %d", fStop);
604 Printf("fStep = %d", fStep);
605 Printf("fDraw = %d", fDraw);
606 Printf("fDebug = %d", fDebug);
607 if (fDirProofBench)
608 Printf("fDirProofBench = %s", fDirProofBench->GetPath());
609 if (fNodes) fNodes->Print(option);
611 if (fCanvas)
612 Printf("Performance Canvas: Name = %s Title = %s",
614 Printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
615}
616
617////////////////////////////////////////////////////////////////////////////////
618/// Draw Performance plots
619
621{
622 // Get canvas
623 if (!fCanvas) fCanvas = new TCanvas("Canvas");
624
625 fCanvas->Clear();
626
627 // Divide the canvas as many as the number of profiles in the list
628 Int_t nprofiles = fListPerfPlots->GetSize();
629 if (nprofiles <= 2){
630 fCanvas->Divide(1,nprofiles);
631 } else {
632 Int_t nside = (Int_t)TMath::Sqrt((Float_t)nprofiles);
633 nside = (nside*nside<nprofiles)?nside+1:nside;
634 fCanvas->Divide(nside,nside);
635 }
636
637 Int_t npad=1;
639 TProfile* profile=0;
640 while ((profile=(TProfile*)(nxt()))){
641 fCanvas->cd(npad++);
642 profile->Draw();
643 gPad->Update();
644 }
645 return;
646}
647
648////////////////////////////////////////////////////////////////////////////////
649/// Set histogram type
650
652{
653 fHistType = histtype;
654 fName.Form("%sCPU", GetNameStem().Data());
655}
656
657////////////////////////////////////////////////////////////////////////////////
658/// Get name for this run
659
661{
662 TString namestem("+++undef+++");
663 if (fHistType) {
664 switch (fHistType->GetType()) {
666 namestem = "Hist1D";
667 break;
669 namestem = "Hist2D";
670 break;
672 namestem = "Hist3D";
673 break;
675 namestem = "HistAll";
676 break;
677 default:
678 break;
679 }
680 }
681 return namestem;
682}
683
684////////////////////////////////////////////////////////////////////////////////
685/// Set parameters
686
688{
689 if (!fProof) {
690 Error("SetParameters", "proof not set; Doing nothing");
691 return 1;
692 }
693
696 fProof->SetParameter("PROOF_BenchmarkNHists", fNHists);
697 fProof->SetParameter("PROOF_BenchmarkDraw", Int_t(fDraw));
698 return 0;
699}
700
701////////////////////////////////////////////////////////////////////////////////
702/// Delete parameters set for this run
703
705{
706 if (!fProof){
707 Error("DeleteParameters", "proof not set; Doing nothing");
708 return 1;
709 }
710 if (fProof->GetInputList()) {
711 TObject *type = fProof->GetInputList()->FindObject("PROOF_Benchmark_HistType");
713 }
714 fProof->DeleteParameters("PROOF_BenchmarkNHists");
715 fProof->DeleteParameters("PROOF_BenchmarkDraw");
716 return 0;
717}
718
#define SafeDelete(p)
Definition RConfig.hxx:525
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:80
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:377
#define gDirectory
Definition TDirectory.h:384
R__EXTERN TEnv * gEnv
Definition TEnv.h:170
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char y1
char name[80]
Definition TGX11.cxx:110
const char *const kPROOF_BenchCPUSelPar
const char *const kPROOF_BenchSelCPUDef
const char *const kPROOF_BenchParDir
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
Definition TString.cxx:2481
R__EXTERN TStyle * gStyle
Definition TStyle.h:433
#define gPad
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Definition TAttMarker.h:38
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
Definition TAttMarker.h:40
The Canvas class.
Definition TCanvas.h:23
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
Definition TCanvas.cxx:734
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
Definition TCanvas.cxx:716
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition TClass.cxx:2968
Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0) override
Write all objects in this collection.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
void Print(Option_t *option="") const override
Default print for collections, calls Print(option, 1).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Definition TDatime.h:37
Describe directory structure in memory.
Definition TDirectory.h:45
virtual TDirectory * GetDirectory(const char *namecycle, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory using apath.
virtual const char * GetPath() const
Returns the full path of the directory.
virtual Bool_t cd()
Change current directory to "this" directory.
virtual Bool_t IsWritable() const
Definition TDirectory.h:237
virtual TDirectory * mkdir(const char *name, const char *title="", Bool_t returnExistingDirectory=kFALSE)
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
Set the value of a resource or create a new resource.
Definition TEnv.cxx:736
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
Definition TH1.cxx:8854
TAxis * GetXaxis()
Definition TH1.h:322
virtual void SetMaximum(Double_t maximum=-1111)
Definition TH1.h:400
TAxis * GetYaxis()
Definition TH1.h:323
void Draw(Option_t *option="") override
Draw this histogram with options.
Definition TH1.cxx:3067
virtual void SetMinimum(Double_t minimum=-1111)
Definition TH1.h:401
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
Definition TH1.cxx:3114
2-D histogram with a double per channel (see TH1 documentation)}
Definition TH2.h:301
Int_t Fill(Double_t) override
Invalid Fill method.
Definition TH2.cxx:347
This class displays a legend box (TPaveText) containing several legend entries.
Definition TLegend.h:23
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
Definition TLegend.cxx:317
void Draw(Option_t *option="") override
Draw this legend with its current attributes.
Definition TLegend.cxx:422
A doubly linked list.
Definition TList.h:38
void Clear(Option_t *option="") override
Remove all objects from the list.
Definition TList.cxx:402
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
Definition TList.cxx:578
void Add(TObject *obj) override
Definition TList.h:81
TObject * Remove(TObject *obj) override
Remove object from the list.
Definition TList.cxx:822
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:164
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
Mother of all ROOT objects.
Definition TObject.h:41
@ kOverwrite
overwrite existing object with same name
Definition TObject.h:92
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:199
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:973
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
Definition TObject.cxx:403
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:987
@ kInvalidObject
if object ctor succeeded but object should not be used
Definition TObject.h:72
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:961
EHistType GetType() const
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
Definition TPad.cxx:1153
const char * GetTitle() const override
Returns title of object.
Definition TPad.h:259
const char * GetName() const override
Returns name of object.
Definition TPad.h:258
TString fEvtNode
Definition TPerfStats.h:42
TVirtualPerfStats::EEventType fType
Definition TPerfStats.h:44
Double_t fProcTime
Definition TPerfStats.h:54
Long64_t fEventsProcessed
Definition TPerfStats.h:50
Profile Histogram.
Definition TProfile.h:32
Double_t GetBinContent(Int_t bin) const override
Return bin content of a Profile histogram.
Definition TProfile.cxx:821
Double_t GetBinError(Int_t bin) const override
Return bin error of a Profile histogram.
Definition TProfile.cxx:885
Int_t Fill(const Double_t *v)
Definition TProfile.h:55
CPU-intensive PROOF benchmark test generates events and fill 1, 2, or 3-D histograms.
TString GetNameStem() const
Get name for this run.
void FillPerfStatPerfPlots(TTree *t, Int_t nactive)
TDirectory * fDirProofBench
Int_t DeleteParameters()
Delete parameters set for this run.
const char * GetName() const override
Returns name of object.
Int_t SetParameters()
Set parameters.
TProfile * fProfile_queryresult_event
void BuildHistos(Int_t start, Int_t stop, Int_t step, Bool_t nx)
Build histograms, profiles and graphs needed for this run.
TProfile * fNorm_queryresult_event
TProfile * fProfile_perfstat_evtmax
~TProofBenchRunCPU() override
Destructor.
TProfile * fNorm_perfstat_evtmax
TProfile * fProfile_cpu_eff
void DrawPerfPlots()
Draw Performance plots.
void Print(Option_t *option="") const override
Show settings.
TPBHistType * fHistType
TProfile * fProfile_perfstat_event
void Run(Long64_t nevents, Int_t start, Int_t stop, Int_t step, Int_t ntries, Int_t debug, Int_t draw) override
Run benchmark Input parameters nevents: Number of events to run per file.
void SetHistType(TPBHistType *histtype)
Set histogram type.
TProofBenchRunCPU(TPBHistType *histtype=0, Int_t nhists=16, TDirectory *dirproofbench=0, TProof *proof=0, TProofNodes *nodes=0, Long64_t nevents=1000000, Int_t ntries=2, Int_t start=1, Int_t stop=-1, Int_t step=1, Int_t draw=0, Int_t debug=0)
Default constructor.
Abstract base class for PROOF benchmark runs.
virtual const char * GetSelName()
PROOF worker node information
Definition TProofNodes.h:28
void Print(Option_t *option="") const override
Description: Print node information.
Int_t ActivateWorkers(Int_t nwrks)
Description: Activate 'nwrks' workers; calls TProof::SetParallel and rebuild the internal lists Input...
Int_t GetNNodes() const
Definition TProofNodes.h:49
Int_t GetMinWrksPerNode() const
Definition TProofNodes.h:51
Int_t GetNWorkersCluster() const
Definition TProofNodes.h:48
Int_t GetNCores() const
Definition TProofNodes.h:50
Set of tools to analyse the performance tree.
Double_t GetEvtRateAvgMax() const
This class controls a Parallel ROOT Facility, PROOF, cluster.
Definition TProof.h:316
void Print(Option_t *option="") const override
Print status of PROOF cluster.
Definition TProof.cxx:4803
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file).
Definition TProof.cxx:8441
TQueryResult * GetQueryResult(const char *ref=0)
Return pointer to the full TQueryResult instance owned by the player and referenced by 'ref'.
Definition TProof.cxx:2148
void DeleteParameters(const char *wildcard)
Delete the input list parameters specified by a wildcard (e.g.
Definition TProof.cxx:9933
void SetParameter(const char *par, const char *value)
Set input list parameter.
Definition TProof.cxx:9822
TList * GetOutputList()
Get list with all object created during processing (see Process()).
Definition TProof.cxx:9808
virtual Long64_t Process(TDSet *dset, const char *selector, Option_t *option="", Long64_t nentries=-1, Long64_t firstentry=0)
Process a data set (TDSet) using the specified selector (.C) file or Tselector object Entry- or event...
Definition TProof.cxx:5303
void AddInput(TObject *obj)
Add objects that might be needed during the processing of the selector (see Process()).
Definition TProof.cxx:9734
TList * GetInputList()
Get input list.
Definition TProof.cxx:9753
Int_t EnablePackage(const char *package, Bool_t notOnClient=kFALSE, TList *workers=0)
Enable specified package.
Definition TProof.cxx:8175
A container class for query results.
Long64_t GetEntries() const
TDatime GetEndTime() const
TDatime GetStartTime() const
Float_t GetProcTime() const
void Print(Option_t *opt="") const override
Print query content. Use opt = "F" for a full listing.
Float_t GetUsedCPU() const
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
Definition TROOT.cxx:3031
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:380
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition TString.cxx:2242
Bool_t IsNull() const
Definition TString.h:418
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2356
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition TString.cxx:2334
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:636
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
Definition TStyle.cxx:1636
A TTree represents a columnar dataset.
Definition TTree.h:79
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Definition TTree.cxx:5635
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=nullptr)
Change branch address, dealing with clone trees properly.
Definition TTree.cxx:8377
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
Definition TTree.cxx:8953
virtual Long64_t GetEntries() const
Definition TTree.h:463
Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0) override
Write this object to the current directory.
Definition TTree.cxx:9740
void SetName(const char *name) override
Change the name of this tree.
Definition TTree.cxx:9192
Double_t Sqrt(Double_t x)
Returns the square root of x.
Definition TMath.h:662
TLine l
Definition textangle.C:4