42 class TProofPerfAnalysis::TWrkInfo :
public TNamed {
44 TWrkInfo(
const char *
ord,
const char *
name) :
45 TNamed(ord, name), fPackets(0), fRemotePackets(0), fEventsProcessed(0),
46 fBytesRead(0), fLatency(0), fProcTime(0), fCpuTime(0), fStart(0), fStop(-1),
47 fRateT(0), fRateRemoteT(0), fMBRateT(0), fMBRateRemoteT(0), fLatencyT(0) { }
69 Double_t AvgRate() {
if (fProcTime > 0)
return (fEventsProcessed/fProcTime);
return -1.; }
70 Double_t AvgIO() {
if (fProcTime > 0)
return (fBytesRead/fProcTime);
return -1.; }
73 Printf(
" +++ TWrkInfo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
75 Printf(
" +++ Activity interval: %f -> %f", fStart, fStop);
76 Printf(
" +++ Amounts processed: %d packets (%d remote), %lld evts, %lld bytes",
77 fPackets, fRemotePackets, fEventsProcessed, fBytesRead);
79 Printf(
" +++ Processing time: %f s (CPU: %f s)", fProcTime, fCpuTime);
80 Printf(
" +++ Averages: %f evts/s, %f MB/s", (
Double_t)fEventsProcessed / fProcTime, (
Double_t)fBytesRead /1024./1024./fProcTime);
82 Printf(
" +++ Total latency: %f", fLatency);
83 Printf(
" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
88 if (fStop < wi->fStop) {
90 }
else if (fStop == wi->fStop) {
98 class TProofPerfAnalysis::TPackInfo :
public TNamed {
100 TPackInfo(
const char *
ord,
const char *host) :
TNamed(ord, host), fStart(0), fStop(-1), fSize(0), fMBRate(0.) { }
102 :
TNamed(ord, host), fStart(start), fStop(stop), fSize(sz), fMBRate(mbr) { }
108 if (!strcmp(opt,
"S")) {
109 Printf(
" \t%10lld evts, \t%12.2f MB/s, \t%12.3f -> %12.3f s", fSize, fMBRate, fStart, fStop);
111 Printf(
" %s:\t%s \t%10lld evts, \t%12.2f MB/s, \t%12.3f -> %12.3f s",
GetTitle(),
GetName(), fSize, fMBRate, fStart, fStop);
116 class TProofPerfAnalysis::TWrkInfoFile :
public TNamed {
118 TWrkInfoFile(
const char *
ord,
const char *
name) :
TNamed(ord, name) { }
119 ~TWrkInfoFile() {fPackets.SetOwner(
kFALSE); fPackets.
Clear(
"nodelete");}
122 if (!strcmp(opt,
"R")) {
127 TIter nxp(&fPackets);
129 while ((o = nxp())) { o->
Print(
"S"); }
133 class TProofPerfAnalysis::TWrkEntry :
public TObject {
140 void Print(
Option_t * =
"")
const {
Printf(
"%.4f \t%.3f evt/s \t%.3f MB/s \t%.3f s ", fXx, fEvtRate, fMBRate, fProcTime); }
145 class TProofPerfAnalysis::TFileInfo :
public TNamed {
148 TNamed(name, srv), fPackets(0), fRPackets(0), fStart(0), fStop(-1),
149 fSizeAvg(0), fSizeMax(-1.), fSizeMin(-1.),
150 fMBRateAvg(0), fMBRateMax(-1.), fMBRateMin(-1.), fSizeP(0),
151 fRateP(0), fRatePRemote(0), fMBRateP(0), fMBRatePRemote(0) { }
184 Printf(
" +++ TFileInfo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
187 Printf(
" +++ Processing interval: %f -> %f", fStart, fStop);
188 Printf(
" +++ Packets: %d (%d remote)", fPackets, fRPackets);
190 if (!strcmp(opt,
"P")) fPackList.
Print();
191 if (!strcmp(opt,
"WP")) fWrkList.
Print(
"R");
193 Printf(
" +++ MB rates: %f MB/s (avg), %f MB/s (min), %f MB/s (max)",
194 fMBRateAvg / fPackets, fMBRateMin, fMBRateMax);
195 Printf(
" +++ Sizes: %lld (avg), %lld (min), %lld (max)",
196 fSizeAvg / fPackets, fSizeMin, fSizeMax);
198 Printf(
" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
203 if (fStop < wi->fStop) {
205 }
else if (fStop == wi->fStop) {
217 const char *title,
const char *treename)
218 :
TNamed(perffile, title), fFile(0), fTreeName(treename), fTree(0),
219 fInitTime(-1.), fMergeTime(-1.), fMaxTime(-1.),
220 fEvents(0), fPackets(0),
221 fEvtRateMax(-1.), fMBRateMax(-1.), fLatencyMax(-1.),
222 fEvtRate(0), fEvtRateRun(0), fMBRate(0), fMBRateRun(0),
223 fEvtRateAvgMax(-1.), fMBRateAvgMax(-1.),
224 fEvtRateAvg(-1.), fMBRateAvg(0),
225 fFileResult(
""), fSaveResult(
kFALSE),
229 if (!title)
SetTitle(
"PROOF Performance Analysis");
235 Error(
"TProofPerfAnalysis",
"problems opening file '%s'",
236 perffile ? perffile :
"<undef>");
255 Error(
"TProofPerfAnalysis",
"directory '%s' not found or not loadable",
fDirName.
Data());
289 :
TNamed(
"", title), fFile(0), fTree(0),
290 fInitTime(-1.), fMergeTime(-1.), fMaxTime(-1.),
291 fEvents(0), fPackets(0),
292 fEvtRateMax(-1.), fMBRateMax(-1.), fLatencyMax(-1.),
293 fEvtRate(0), fEvtRateRun(0), fMBRate(0), fMBRateRun(0),
294 fEvtRateAvgMax(-1.), fMBRateAvgMax(-1.),
295 fEvtRateAvg(-1.), fMBRateAvg(0),
305 if (!title)
SetTitle(
"PROOF Performance Analysis");
347 if (t && strlen(t) > 0) {
374 while ((k = (
TKey *) nxk())) {
375 if (!strcmp(k->GetClassName(),
"TDirectoryFile")) {
379 }
else if (!strcmp(k->GetClassName(),
"TTree")) {
381 if (tn.Index(re) !=
kNPOS) {
382 if ((
fTree = dynamic_cast<TTree *>(dir->
Get(tn)))) {
384 if (
fgDebug)
Printf(
" +++ Found and loaded TTree '%s'", tn.Data());
402 Error(
"FileDist",
"not a valid instance - do nothing");
410 Info(
"FileDist",
"%d workers were active during this query", wrkList->
GetSize());
411 Info(
"FileDist",
"%d servers were active during this query", srvList->
GetSize());
417 while ((sn = (
TNamed *)nxs())) {
419 while ((wn = (
TNamed *) nxw())) {
430 while ((wn = (
TNamed *) nxw())) {
433 while ((nwn = (
TNamed *) nnxw())) {
439 if (!nwn) nwl->
Add(wn);
442 while ((sn = (
TNamed *)nxs())) {
443 if (!strcmp(sn->
GetTitle(), wn->GetName())) {
446 while ((nsn = (
TNamed *) nnxs())) {
452 if (!nsn) nsl->
Add(sn);
456 if (sn) srvList->
Remove(sn);
460 while ((sn = (
TNamed *)nxs())) {
478 Printf(
"\n +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
479 Printf(
" + Only one data server found: full analysis meaningful + ");
480 Printf(
" + only when there are more file servers + ");
481 Printf(
" +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ \n");
485 TH1F *hxpak =
new TH1F(
"hxpak",
"MBytes / Worker",
494 while ((wn = (
TNamed *)nxsw())) {
511 TH1F *hfdis =
new TH1F(
"hfdis",
"Packet dist",
516 TH1F *hbdis =
new TH1F(
"hbdis",
"MBytes dist",
522 TH2F *hxpak =
new TH2F(
"hxpak",
"MBytes / {Worker,Server}",
534 while ((wn = (
TNamed *)nxsw())) {
539 while ((sn = (
TNamed *)nxss())) {
550 while ((sn = (
TNamed *)nxss())) {
553 if (strcmp(sn->
GetTitle(),
"remote") && lab.Index(
".") !=
kNPOS) lab.Remove(lab.Index(
"."));
586 if (!wl || !sl)
return;
594 for (
Long64_t k=0; k<entries; k++) {
609 if (ifn !=
kNPOS) srv.Remove(ifn);
612 sn =
new TNamed(srv.Data(),
"remote");
628 Int_t o1d = 0, o2d = 0;
629 if ((o1d = o1.CountChar(
'.')) > (o2d = o2.CountChar(
'.'))) {
631 }
else if (o1d < o2d) {
634 o1.ReplaceAll(
".",
" ");
635 o2.ReplaceAll(
".",
" ");
636 Bool_t b1 = o1.Tokenize(p1, o1d,
" ");
637 Bool_t b2 = o2.Tokenize(p2, o2d,
" ");
644 b1 = o1.Tokenize(p1, o1d,
" ");
645 b2 = o2.Tokenize(p2, o2d,
" ");
650 }
else if (b2 && !b1) {
663 if (!hf || !hb || !hx)
return;
669 if (!(fout = fopen(fnout.
Data(),
"w"))) {
670 Warning(
"FillFileDist",
"asked to save details in '%s' but file could"
671 " not be open (errno: %d)", fnout.
Data(), (int)errno);
673 Info(
"FillFileDist",
"saving details to '%s'", fnout.
Data());
681 for (
Long64_t k=0; k<entries; k++) {
690 if (ifn !=
kNPOS) srv.Remove(ifn);
697 fprintf(fout,
"%s,%s -> %f,%f (%f)\n",
698 srv.Data(), wrk.Data(), xhx, yhx, pe.
fBytesRead / 1024.);
704 if (fout) fclose(fout);
720 if (!(fout = fopen(fnout.
Data(),
"w"))) {
721 Warning(
"FillFileDistOneSrv",
"asked to save details in '%s' but file could"
722 " not be open (errno: %d)", fnout.
Data(), (int)errno);
724 Info(
"FillFileDistOneSrv",
"saving details to '%s'", fnout.
Data());
732 for (
Long64_t k=0; k<entries; k++) {
741 if (ifn !=
kNPOS) srv.Remove(ifn);
746 fprintf(fout,
"%s,%s -> %f (%f)\n",
747 srv.Data(), wrk.Data(), xhx, pe.
fBytesRead / 1024.);
751 if (fout) fclose(fout);
762 Error(
"WorkerActivity",
"not a valid instance - do nothing");
769 Error(
"WorkerActivity",
"workers information not available - do nothing");
775 if ((o =
gDirectory->FindObject(
"act10")))
delete o;
778 if (t1 > t0) t1 = t0;
779 TH1F *hact10 =
new TH1F(
"act10",
"Worker activity start (seconds)", 50, 0., t1);
781 if ((o =
gDirectory->FindObject(
"act11")))
delete o;
782 TH1F *hact11 =
new TH1F(
"act11",
"Worker activity stop (seconds)", 50, t0,
fMaxTime);
784 if ((o =
gDirectory->FindObject(
"act2")))
delete o;
785 TH1F *hact2 =
new TH1F(
"act2",
"End of activity (seconds)", 50, t0,
fMaxTime);
795 while ((wi = (TWrkInfo *)nxw())) {
797 for (j = 1; j < hact10->
GetNbinsX()+1 ; j++) {
801 for (j = 1; j < hact11->
GetNbinsX()+1 ; j++) {
805 hact2->
Fill(wi->fStop);
842 while ((wi = (TWrkInfo *)nxw())) {
845 if (showlast < 0 || k < showlast) wi->
Print();
856 if (!wn || (wn && strlen(wn) <= 0)) {
857 Error(
"PrintWrkInfo",
"worker name or host must be defined!");
869 while ((wi = (TWrkInfo *)nxw())) {
870 TString n(wi->GetName()), t(wi->GetTitle());
872 while (ww.Tokenize(w, from,
"[, ]")) {
874 if (
n.Index(re) !=
kNPOS || t.Index(re) !=
kNPOS) wi->Print();
893 while ((fi = (TFileInfo *)nxf())) {
896 if (showlast < 0 || k < showlast) fi->Print(opt);
909 if (!fn || (fn && strlen(fn) <= 0)) {
910 Error(
"PrintFileInfo",
"file path must be defined!");
925 while ((fi = (TFileInfo *)nxf())) {
926 TString n(fi->GetName()), s(fi->GetTitle());
928 while (fw.Tokenize(f, from,
"[, ]")) {
930 if (
n.Index(re) !=
kNPOS || s.Index(re) !=
kNPOS) fi->Print(opt);
964 Int_t nraw = entries * 2, jj = 0, kk = 0;
966 for (
Long64_t k=0; k<entries; k++) {
979 memset(jidx, 0, nbins *
sizeof(
Int_t));
983 for (kk = 0; kk <
nbins; kk++) {
985 if (jj == 0 || xtmp > xbins[jj - 1] + .5) {
995 Int_t nbin = nbins - 1;
997 if ((o =
gDirectory->FindObject(
"gEvtRate")))
delete o;
998 fEvtRate =
new TH1F(
"gEvtRate",
"Total event processing rate (evt/s)", nbin, xbins);
1003 if ((o =
gDirectory->FindObject(
"gEvtRateAvg")))
delete o;
1004 fEvtRateRun =
new TH1F(
"gEvtRateAvg",
"Event processing rate running average (evt/s)", nbin, xbins);
1009 if ((o =
gDirectory->FindObject(
"gMBRate")))
delete o;
1010 fMBRate =
new TH1F(
"gMBRate",
"Total processing rate (MB/s)", nbin, xbins);
1011 fMBRate->SetMinimum(0.);
1012 fMBRate->SetStats(
kFALSE);
1013 fMBRate->SetFillColor(
kCyan-8);
1014 fMBRate->GetXaxis()->SetTitle(
"Query Processing Time (s)");
1015 if ((o =
gDirectory->FindObject(
"gMBRateAvg")))
delete o;
1016 fMBRateRun =
new TH1F(
"gMBRateAvg",
"Processing rate running average (MB/s)", nbin, xbins);
1029 for (
Long64_t k=0; k<entries; k++) {
1037 wi->fRateT =
new TGraph(100);
1038 wi->fRateRemoteT =
new TGraph(100);
1039 wi->fMBRateT =
new TGraph(100);
1040 wi->fMBRateRemoteT =
new TGraph(100);
1041 wi->fLatencyT =
new TGraph(100);
1046 if (wi->fPackets <= 0) {
1062 wi->fRateT->SetPoint(wi->fPackets, tt, ert);
1063 if (brt > 0.) wi->fMBRateT->SetPoint(wi->fPackets, tt, brt);
1064 wi->fLatencyT->SetPoint(wi->fPackets, tt, pe.
fLatency);
1066 wi->fRateRemoteT->SetPoint(wi->fRemotePackets, tt, ert);
1067 wi->fMBRateRemoteT->SetPoint(wi->fRemotePackets, tt, brt);
1068 wi->fRemotePackets++;
1072 if (brt > fMBRateMax) fMBRateMax = brt;
1076 for (kk = 1; kk <=
nbins; kk++) {
1078 if (mi > stop)
break;
1084 if (start > mi) olap = mx - start;
1104 Printf(
" +++ %s #:%d at:%fs lat:%fs proc:%fs evts:%lld bytes:%lld (rates:%f evt/s, %f MB/s)",
1109 Printf(
" +++ %s #:%d at:%fs lat:%fs proc:%fs rate:-- evt/s (-- bytes/s)",
1129 while ((gwl = (
TList *) nxw())) {
1133 while ((we = (TWrkEntry *) nxp())) {
1134 if (we->fProcTime > 0) {
1135 er += we->fEvtRate * we->fProcTime;
1136 br += we->fMBRate * we->fProcTime;
1137 pt += we->fProcTime;
1145 if (br > 0.) fMBRate->Fill(xx, br);
1152 for (kk = 1; kk <
nbins; kk++) {
1156 Double_t wbr = fMBRate->GetBinContent(kk);
1183 while ((wi = (TWrkInfo *) nxw())) {
1187 wi->fRateT->Set(wi->fPackets);
1188 wi->fRateRemoteT->Set(wi->fRemotePackets);
1189 wi->fLatencyT->Set(wi->fPackets);
1190 wi->fMBRateT->Set(wi->fPackets);
1191 wi->fMBRateRemoteT->Set(wi->fRemotePackets);
1200 while ((wi = (TWrkInfo *) nxsw())) {
1201 if (wi->fStop > 0.) ksw++;
1202 if (ksw == rsw)
break;
1212 fPackets->SetDirectory(0);
1215 while ((wi = (TWrkInfo *)nxwi())) {
1218 fPackets->GetXaxis()->SetBinLabel(j+1, wi->GetName());
1219 fPackets->Fill(j++, wi->fPackets);
1222 fPackets->SetMinimum(0.);
1224 fPackets->SetFillColor(38);
1227 fPackets->GetYaxis()->SetTitle(
"Packets");
1228 fPackets->GetXaxis()->SetTitle(
"Worker");
1249 if (!strcmp(opt,
"S")) {
1251 Printf(
"%d %f %f %f %f %f %f %f",
1257 Printf(
" +++ Total query time: %f secs (init: %f secs, merge: %f secs)",
1259 Printf(
" +++ Avg processing rates: %.4f evts/s, %.4f MB/s",
fEvtRateAvg, fMBRateAvg);
1285 for (
Long64_t k=0; k<entries; k++) {
1292 if (ifn !=
kNPOS) srv.Remove(ifn);
1296 fi =
new TFileInfo(uf.
GetFile(), srv.Data());
1298 fi->fSizeP =
new TGraph(10);
1299 fi->fRateP =
new TGraph(10);
1300 fi->fRatePRemote =
new TGraph(10);
1301 fi->fMBRateP =
new TGraph(10);
1302 fi->fMBRatePRemote =
new TGraph(10);
1307 if (fi->fPackets <= 0) {
1324 fi->fRateP->SetPoint(fi->fPackets, tt, ert);
1325 if (brt > 0.) fi->fMBRateP->SetPoint(fi->fPackets, tt, brt);
1328 fi->fRatePRemote->SetPoint(fi->fRPackets, tt, ert);
1329 fi->fMBRatePRemote->SetPoint(fi->fRPackets, tt, brt);
1334 fi->fMBRateAvg += brt;
1335 if (brt > fi->fMBRateMax || fi->fMBRateMax < 0.) fi->fMBRateMax = brt;
1336 if (brt < fi->fMBRateMin || fi->fMBRateMin < 0.) fi->fMBRateMin = brt;
1341 fi->fPackList.Add(pi);
1342 TWrkInfoFile *wif = 0;
1343 if (!(wif = (TWrkInfoFile *) fi->fWrkList.FindObject(pe.
fSlave))) {
1345 fi->fWrkList.Add(wif);
1347 wif->fPackets.Add(pi);
1352 Printf(
" +++ %s #:%d at:%fs lat:%fs proc:%fs evts:%lld bytes:%lld (rates:%f evt/s, %f MB/s)",
1357 Printf(
" +++ %s #:%d at:%fs lat:%fs proc:%fs rate:-- evt/s (-- bytes/s)",
1373 while ((fi = (TFileInfo *) nxf())) {
1376 fi->fRateP->Set(fi->fPackets);
1377 fi->fRatePRemote->Set(fi->fRPackets);
1378 fi->fMBRateP->Set(fi->fPackets);
1379 fi->fMBRatePRemote->Set(fi->fRPackets);
1412 const char *
n = (name && strlen(name) > 0) ? name : 0;
1434 Printf(
"Drawn objects saving disabled");
1452 Error(
"SetSaveResult",
"could not open file '%s' in mode '%s'",
1453 file ? file :
"(undefined)", mode);
1464 Printf(
"Drawn objects will be saved in file '%s'", file);
1481 Error(
"EventDist",
"distributions not initialized - do nothing");
1493 fPackets->SetStats(
kFALSE);
1507 TH1F *hrt1 = 0, *hrt2 = 0;
1514 if ((o =
gDirectory->FindObject(
"rt1")))
delete o;
1515 hrt1 =
new TH1F(
"rt1",
"Evt processing rate (evt/s)", 100, 0.,
fMaxTime);
1520 if ((o =
gDirectory->FindObject(
"rt2")))
delete o;
1521 hrt2 =
new TH1F(
"rt2",
"MB processing rate (MB/s)", 100, 0.,
fMaxTime);
1522 hrt2->SetMinimum(0.);
1523 hrt2->SetMaximum(1.05*fMBRateMax);
1525 hrt2->GetXaxis()->SetTitle(
"Query Processing Time (s)");
1548 if (!ww.
IsNull() && ww !=
"*" && ww !=
"all") {
1551 while ((ww.
Tokenize(w, from,
","))) {
1558 Int_t ci = 40, cir = 30, ic = 0;
1561 while ((wi = (TWrkInfo *) nxw())) {
1562 if (wl && !wl->
FindObject(wi->GetName()))
continue;
1563 if (wi->fRateT && wi->fRateT->GetN() > 0) {
1564 wi->fRateT->
SetNameTitle(wi->GetName(), wi->GetTitle());
1569 if (wi->fRateRemoteT && wi->fRateRemoteT->GetN() > 0) {
1570 wi->fRateRemoteT->SetNameTitle(wi->GetName(), wi->GetTitle());
1575 if (wi->fMBRateT && wi->fMBRateT->GetN() > 0) {
1576 wi->fMBRateT->SetNameTitle(wi->GetName(), wi->GetTitle());
1581 if (wi->fMBRateRemoteT && wi->fMBRateRemoteT->GetN() > 0) {
1582 wi->fMBRateRemoteT->SetNameTitle(wi->GetName(), wi->GetTitle());
1585 DoDraw(wi->fMBRateRemoteT,
"L",
TString::Format(
"MBRateRemoteT-%s", wi->fMBRateRemoteT->GetName()));
1608 if ((o =
gDirectory->FindObject(
"lt1")))
delete o;
1609 TH1F *hlt1 =
new TH1F(
"lt1",
"Packet retrieval latency", 100, 0.,
fMaxTime);
1625 if (!ww.
IsNull() && ww !=
"*" && ww !=
"all") {
1628 while ((ww.
Tokenize(w, from,
","))) {
1635 Int_t ci = 40, ic = 0;
1638 while ((wi = (TWrkInfo *) nxw())) {
1639 if (wl && !wl->
FindObject(wi->GetName()))
continue;
1640 if (wi->fLatencyT) {
1641 wi->fLatencyT->
SetNameTitle(wi->GetName(), wi->GetTitle());
1642 wi->fLatencyT->SetLineColor(ci);
1663 if (!fn || strlen(fn) <= 0) {
1664 Error(
"FileRatePlot",
"file name is mandatory!");
1670 Error(
"FileRatePlot",
"TFileInfo object for '%s' not found!", fn);
1676 if (out && strlen(out) > 0) {
1677 if (!(fo = fopen(out,
"w"))) {
1678 Warning(
"FileRatePlot",
"problems creating '%s': logging to stdout", out);
1681 Printf(
" Details logged to %s", out);
1690 TIter nxp(&(fi->fPackList));
1691 while ((pi = (TPackInfo *) nxp())) {
1693 xraw[jj++] = pi->fStart;
1694 xraw[jj++] = pi->fStop;
1697 memset(jidx, 0, nbins *
sizeof(
Int_t));
1701 for (kk = 0; kk <
nbins; kk++) {
1702 xbins[kk] = xraw[jidx[kk]];
1708 Int_t nbin = nbins - 1;
1710 if ((o =
gDirectory->FindObject(
"rt1")))
delete o;
1711 TH1F *hrt1 =
new TH1F(
"rt1",
"Total processing rate (MB/s)", nbins - 1, xbins);
1715 if ((o =
gDirectory->FindObject(
"rt2")))
delete o;
1716 TH1F *hrt2 =
new TH1F(
"rt2",
"Number of processing workers", nbins - 1, xbins);
1721 if ((o =
gDirectory->FindObject(
"rt3")))
delete o;
1722 TH1F *hrt3 =
new TH1F(
"rt3",
"Total processing events", nbins - 1, xbins);
1726 if ((o =
gDirectory->FindObject(
"rt4")))
delete o;
1727 TH1F *hrt4 =
new TH1F(
"rt4",
"Weighted processing rate (MB/s)", nbins - 1, xbins);
1736 for (ii = 1; ii <= nbin; ii++) {
1741 fprintf(fo,
" Bin: %d/%d [%f, %f]\n", ii, nbin, mi, mx);
1745 while ((pi = (TPackInfo *) nxp())) {
1748 if (pi->fStart > mi) olap = mx - pi->fStart;
1750 hrt1->
Fill(xx, pi->fMBRate);
1752 hrt3->
Fill(xx, pi->fSize);
1753 hrt4->
Fill(xx, pi->fMBRate * pi->fSize);
1754 fprintf(fo,
" %d: %s \t%lld \tevts \t%f \tMB/s\n", kk++, pi->GetName(), pi->fSize, pi->fMBRate);
1758 if (fo != stdout) fclose(fo);
1784 if ((o =
gDirectory->FindObject(
"rt1")))
delete o;
1785 TH1F *hrt1 =
new TH1F(
"rt1",
"Event processing rate per packet (evt/s)", 100, 0.,
fMaxTime);
1790 if ((o =
gDirectory->FindObject(
"rt2")))
delete o;
1791 TH1F *hrt2 =
new TH1F(
"rt2",
"I/O processing rate per packet (MB/s)", 100, 0.,
fMaxTime);
1812 if (!fw.
IsNull() && fw !=
"*" && fw !=
"all") {
1815 while ((fw.
Tokenize(w, from,
","))) {
1822 Int_t ci = 40, cir = 30, ic = 0;
1825 while ((fi = (TFileInfo *) nxf())) {
1826 if (fl && !fl->
FindObject(fi->GetName()))
continue;
1827 if (fi->fRateP && fi->fRateP->GetN() > 0) {
1828 fi->fRateP->SetNameTitle(fi->GetName(), fi->GetTitle());
1833 if (fi->fRatePRemote && fi->fRatePRemote->GetN() > 0) {
1834 fi->fRatePRemote->SetNameTitle(fi->GetName(), fi->GetTitle());
1839 if (fi->fMBRateP && fi->fMBRateP->GetN() > 0) {
1840 fi->fMBRateP->SetNameTitle(fi->GetName(), fi->GetTitle());
1845 if (fi->fMBRatePRemote && fi->fMBRatePRemote->GetN() > 0) {
1846 fi->fMBRatePRemote->SetNameTitle(fi->GetName(), fi->GetTitle());
void SetDebug(Int_t d=0)
Static setter for the verbosity level.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual const char * GetTitle() const
Returns title of object.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
TVirtualPerfStats::EEventType fType
virtual ~TProofPerfAnalysis()
Destructor: detach the tree and close the file.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void SetMaximum(Double_t maximum=-1111)
void Print(Option_t *options="") const
Print information about this object.
virtual TList * GetListOfKeys() const
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual void Draw(Option_t *option="")=0
Default Draw method for all objects.
Collectable string class.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
TString GetCanvasTitle(const char *t)
If defined, add '- ="">' to the canvas title 't'.
void PrintFileInfo(Int_t showlast=10, const char *opt="", const char *out=0)
Print information for all or the slowest showlast workers.
TObject * FindObject(const char *name) const
Find object using its name.
This class represents a WWW compatible URL.
R__EXTERN TStyle * gStyle
virtual void SetName(const char *name)
Change (i.e.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Regular expression class.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual void SetMinimum(Double_t minimum=-1111)
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
1-D histogram with a float per channel (see TH1 documentation)}
struct staticInitHelper gbl
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual Int_t GetNbinsX() const
void LoadTree(TDirectory *dir)
Load tree fTreeName from directory 'dir'.
virtual void SetNameTitle(const char *name, const char *title)
Change (i.e. set) all the TNamed parameters (name and title).
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
void FileDist(Bool_t writedet=kFALSE)
Analyse the file distribution.
virtual Double_t GetBinWidth(Int_t bin) const
return bin width for 1D historam Better to use h1.GetXaxis().GetBinWidth(bin)
void FileProcPlot(const char *fn, const char *out=0)
Show event processing or MB processing rate plot vs time.
const char * Data() const
virtual void Clear(Option_t *option="")
Set name and title to empty strings ("").
Int_t CompareOrd(const char *ord1, const char *ord2)
Return -1 if ord1 comes before ord2, 0 i they are equal, 1 if ord1 comes after ord2.
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual Double_t GetBinLowEdge(Int_t bin) const
return bin lower edge for 1D historam Better to use h1.GetXaxis().GetBinLowEdge(bin) ...
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
The TNamed class is the base class for all named ROOT classes.
void EventDist()
Display event and packet distribution.
static double p2(double t, double a, double b, double c)
void FileRatePlot(const char *fns=0)
Show MB processing rate plot per file vs time.
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
void RatePlot(const char *wrks=0)
Show event processing or MB processing rate plot vs time.
Int_t Atoi() const
Return integer value of string.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TProofPerfAnalysis(const char *perffile, const char *title="", const char *treename="PROOF_PerfStats")
Constructor: open the file and attach to the tree.
virtual Int_t Compare(const TObject *obj) const
Compare two TNamed objects.
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2), errors are also recalculated.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
virtual void SetLineColor(Color_t lcolor)
virtual Double_t GetBinCenter(Int_t bin) const
return bin center for 1D historam Better to use h1.GetXaxis().GetBinCenter(bin)
Int_t SetSaveResult(const char *file="results.root", Option_t *mode="RECREATE")
Set save result mode and validate 'file' according to 'mode'.
R__EXTERN TSystem * gSystem
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
Long64_t fEventsProcessed
2-D histogram with a float per channel (see TH1 documentation)}
virtual TObject * Remove(TObject *obj)
Remove object from the list.
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
The most important graphics class in the ROOT system.
static void SetgDebug(Bool_t on=kTRUE)
Static setter for the verbosity level.
virtual const char * GetName() const
Returns name of object.
static double p1(double t, double a, double b)
virtual void Print(Option_t *option="") const
Print TNamed name and title.
void SetName(const char *name)
void WorkerActivity()
Measure the worker activity.
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
virtual Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=0)
Redirect standard output (stdout, stderr) to the specified file.
TString & Remove(Ssiz_t pos)
virtual Int_t GetSize() const
void GetWrkFileList(TList *wl, TList *sl)
Fill file info.
Describe directory structure in memory.
void DoDraw(TObject *o, Option_t *opt="", const char *name=0)
Draw object 'o' with options 'opt' Save it with 'name' if in saving mode (see SetSaveResult) ...
virtual void SetBinLabel(Int_t bin, const char *label)
Set label for bin.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
void FillFileDistOneSrv(TH1F *hx, Bool_t wdet=kFALSE)
Fill file info when there is only one file server.
virtual Double_t GetBinCenter(Int_t bin) const
Return center of bin.
Mother of all ROOT objects.
void FillFileDist(TH1F *hf, TH1F *hb, TH2F *hx, Bool_t wdet=kFALSE)
Fill file info.
virtual TVirtualPad * GetPad(Int_t subpadnumber) const
Get a pointer to subpadnumber of this pad.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
virtual void Add(TObject *obj)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
A Graph is a graphics object made of two arrays X and Y with npoints each.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
virtual Long64_t GetEntries() const
A TTree object has a header with a name and a title.
Class describing a generic file including meta information.
void LatencyPlot(const char *wrks=0)
Show event processing or MB processing rate plot vs time Create the histograms.
virtual void Update()
Update canvas pad buffers.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void FillFileInfo(Bool_t force=kFALSE)
Fill basic worker info; if 'force' rescan the TTree even already done.
Int_t Fill(Double_t)
Invalid Fill method.
virtual const char * GetTitle() const
Returns title of object.
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
void FillWrkInfo(Bool_t force=kFALSE)
Fill basic worker info; if 'force' rescan the TTree even already done.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
const char * GetFile() const
void Summary(Option_t *opt="", const char *out="")
Print summary of query.
virtual void Close(Option_t *option="")
Close a file.
void PrintWrkInfo(Int_t showlast=10)
Print information for all or the slowest showlast workers.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.