23#include "RConfigure.h" 
   63                         fReadType(readtype), fDS(pbds),
 
   64                         fNEvents(nevents), fNTries(ntries), fStart(start), fStop(stop), fStep(step),
 
   65                         fDebug(debug), fFilesPerWrk(2), fReleaseCache(
kTRUE),
 
   66                         fDirProofBench(dirproofbench), fNodes(nodes),
 
   67                         fListPerfPlots(0), fProfile_perfstat_event(0), fHist_perfstat_event(0),
 
   68                         fProfile_perfstat_evtmax(0), fNorm_perfstat_evtmax(0),
 
   69                         fProfile_queryresult_event(0), fNorm_queryresult_event(0),
 
   70                         fProfile_perfstat_IO(0), fHist_perfstat_IO(0),
 
   71                         fProfile_perfstat_IOmax(0), fNorm_perfstat_IOmax(0),
 
   72                         fProfile_queryresult_IO(0), fNorm_queryresult_IO(0), fProfile_cpu_eff(0),
 
   73                         fProfLegend_evt(0), fNormLegend_evt(0), fProfLegend_mb(0), fNormLegend_mb(0),
 
   74                         fCPerfProfiles(0), fName(0)
 
  127      Error(
"Run", 
"Proof not set");
 
  130   if (!dset || (dset && strlen(dset) <= 0)){
 
  131      Error(
"Run", 
"dataset name not set");
 
  136      Error(
"Run", 
"no such data set found; %s", dset);
 
  140   start = (start == -1) ? 
fStart : start;
 
  141   stop = (stop == -1) ? 
fStop : stop;
 
  142   step = (step == -1) ? 
fStep : step;
 
  143   ntries = (ntries == -1) ? 
fNTries : ntries;
 
  144   debug = (debug == -1) ? 
fDebug : debug;
 
  157      if (stop > minnworkersanode) stop = minnworkersanode;
 
  166         Info(
"Run", 
"Uploading '%s' ...", par.
Data());
 
  168            Error(
"Run", 
"problems uploading '%s' - cannot continue", par.
Data());
 
  178            Error(
"Run", 
"you should load the class '%s' before running the benchmark", 
fSelName.
Data());
 
  184               Info(
"Run", 
"Uploading '%s' ...", par.
Data());
 
  186                  Error(
"Run", 
"problems uploading '%s' - cannot continue", par.
Data());
 
  189               Info(
"Run", 
"Enabling '%s' ...", par.
Data());
 
  191                  Error(
"Run", 
"problems enabling '%s' - cannot continue", par.
Data());
 
  221   Info(
"Run", 
"Running IO-bound tests on dataset '%s'; %d ~ %d active worker(s)," 
  222               " every %d worker(s).", dset, start, stop, step);
 
  230   Double_t ymi = -1., ymx = -1., emx =- 1, ymiio = -1., ymxio = -1., mbmx = -1.;
 
  231   for (
Int_t nactive = start; nactive <= stop; nactive += step) {
 
  234      Int_t ncoren = (nactive < ncores) ? nactive : ncores;
 
  240         workers.
Form(
"%dx", nactive);
 
  246         Error(
"Run", 
"could not activate the requested number of" 
  247                      " workers/node on the cluster; skipping the test point" 
  248                      " (%d workers/node)", nactive);
 
  256         Error(
"Run", 
"could not retrieve dataset '%s'", dsname.
Data());
 
  264      for (
Int_t j=0; j<ntries; j++) {
 
  267            Info(
"Run", 
"Running IO-bound tests with %d active worker(s)/node;" 
  268                        " trial %d/%d", nactive, j + 1, ntries);
 
  270            Info(
"Run", 
"Running IO-bound tests with %d active worker(s);" 
  271                        " trial %d/%d", nactive, j + 1, ntries);
 
  281         Info(
"Run", 
"Processing data set %s with" 
  282                     " %d active worker(s).", dsn.
Data(), nactive);
 
  294         TString perfstats_name = 
"PROOF_PerfStats";
 
  322            Double_t nert = nx ? pf_eventrate/nactive/nnodes : pf_eventrate/nactive;
 
  327            if (dy / 
y1 < 0.2) dy = 
y1 * 0.2;
 
  328            if (dy > 
y1) dy = 
y1*.999999;
 
  329            if (ymi < 0.) ymi = 
y1 - dy;
 
  332            if (ymx < 0.) ymx = 
y1 + dy;
 
  341            Double_t niort = nx ? pf_IOrate/nactive/nnodes : pf_IOrate/nactive;
 
  346            if (dy / 
y1 < 0.2) dy = 
y1 * 0.2;
 
  347            if (dy > 
y1) dy = 
y1*.999999;
 
  348            if (ymiio < 0.) ymiio = 
y1 - dy;
 
  351            if (ymxio < 0.) ymxio = 
y1 + dy;
 
  366               TString dirn = nx ? 
"RunDataReadx" : 
"RunDataRead";
 
  374                  Warning(
"Run", 
"cannot cd to subdirectory '%s' to store the results!", dirn.
Data());
 
  380               Warning(
"Run", 
"%s: tree not found", perfstats_name.
Data());
 
  382               Error(
"Run", 
"PROOF output list is empty!");
 
  386         const char *drawopt = t ? 
"SAME" : 
"";
 
  400               qr_cpu_eff = queryresult->
GetUsedCPU() / ncoren / qr_proc ;
 
  402               Printf(
"cpu_eff: %f", qr_cpu_eff);
 
  408            qr_eventrate = qr_entries / 
Double_t(qr_proc);
 
  409            if (qr_eventrate > emx) emx = qr_eventrate;
 
  421            const Double_t Dmegabytes = 1024*1024;
 
  423            qr_IOrate = qr_bytes / Dmegabytes / 
Double_t(qr_proc);
 
  424            if (qr_IOrate > mbmx) mbmx = qr_IOrate;
 
  435            Double_t nert = nx ? qr_eventrate/nactive/nnodes : qr_eventrate/nactive;
 
  440            if (dy / 
y1 < 0.2) dy = 
y1 * 0.2;
 
  441            if (dy > 
y1) dy = 
y1*.999999;
 
  442            if (ymi < 0.) ymi = 
y1 - dy;
 
  445            if (ymx < 0.) ymx = 
y1 + dy;
 
  455            Double_t niort = nx ? qr_IOrate/nactive/nnodes : qr_IOrate/nactive;
 
  460            if (dy / 
y1 < 0.2) dy = 
y1 * 0.2;
 
  461            if (dy > 
y1) dy = 
y1*.999999;
 
  462            if (ymiio < 0.) ymiio = 
y1 - dy;
 
  465            if (ymxio < 0.) ymxio = 
y1 + dy;
 
  506      TString dirn = nx ? 
"RunDataReadx" : 
"RunDataRead";
 
  514         Warning(
"Run", 
"cannot cd to subdirectory '%s' to store the results!", dirn.
Data());
 
  532      Error(
"GetDataSet", 
"dataset '%s' does not exist", dset);
 
  539      Error(
"GetDataSet", 
"dataset '%s' could not be retrieved", dset);
 
  549      Error(
"GetDataSet", 
"problems classifying info on per-server base");
 
  559      Error(
"GetDataSet", 
"problems getting map of active nodes");
 
  578   while ((key = nxnd())) {
 
  581      while ((ksrv = nxsrv())) {
 
  588               if ((lswrks = 
dynamic_cast<TList *
>(mpnodes->
GetValue(key)))) {
 
  597                  Warning(
"GetDataSet", 
"could not attach to worker list for node '%s'",
 
  601               Warning(
"GetDataSet", 
"could not attach to file collection for server '%s'",
 
  643   const Double_t Dmegabytes = 1024.*1024.;
 
  647   for (
Long64_t k=0; k<entries; k++) {
 
  686      Printf(
"Performance Profiles Canvas: Name = %s Title = %s",
 
  708      nside = (nside*nside < nprofiles) ? nside + 1 : nside;
 
  715   while ((profile=(
TProfile*)(nxt()))){
 
  728   TString namestem(
"+++undef+++");
 
  753      Error(
"SetParameters", 
"Proof not set; Doing nothing");
 
  770      Error(
"DeleteParameters", 
"Proof not set; Doing nothing");
 
  787   Int_t quotient = (stop - start) / step;
 
  788   Int_t ndiv = quotient + 1;
 
  790   Double_t ns_max = quotient*step + start + step/2.;
 
  799      axtitle = 
"Active Workers/Node";
 
  800      namelab.Form(
"x_%s", 
GetName());
 
  808   name.
Form(
"Prof_%s_PS_MaxEvts_%s", namelab.Data(), sellab.
Data());
 
  809   title.
Form(
"Profile %s PerfStat Event- %s", namelab.Data(), sellab.
Data());
 
  824   name.Form(
"Prof_%s_PS_Evts_%s", namelab.Data(), sellab.
Data());
 
  825   title.
Form(
"Profile %s PerfStat Event - %s", namelab.Data(), sellab.
Data());
 
  838   name.Form(
"Hist_%s_PS_Evts_%s", namelab.Data(), sellab.
Data());
 
  839   title.
Form(
"Histogram %s PerfStat Event - %s", namelab.Data(), sellab.
Data());
 
  852   name.Form(
"Norm_%s_PF_MaxEvts_%s", namelab.Data(), sellab.
Data());
 
  853   title.
Form(
"Profile %s Normalized QueryResult Event - %s", namelab.Data(), sellab.
Data());
 
  868   name.Form(
"Prof_%s_QR_Evts_%s", namelab.Data(), sellab.
Data());
 
  869   title.
Form(
"Profile %s QueryResult Event - %s", namelab.Data(), sellab.
Data());
 
  883   name.Form(
"Norm_%s_QR_Evts_%s", namelab.Data(), sellab.
Data());
 
  884   title.
Form(
"Profile %s Normalized QueryResult Event - %s", namelab.Data(), sellab.
Data());
 
  898   name.Form(
"Prof_%s_PS_IO_%s", namelab.Data(), sellab.
Data());
 
  899   title.
Form(
"Profile %s PerfStat I/O %s", namelab.Data(), sellab.
Data());
 
  912   name.Form(
"Hist_%s_PS_IO_%s", namelab.Data(), sellab.
Data());
 
  913   title.
Form(
"Histogram %s PerfStat I/O - %s", namelab.Data(), sellab.
Data());
 
  926   name.Form(
"Prof_%s_PS_MaxIO_%s", namelab.Data(), sellab.
Data());
 
  927   title.
Form(
"Profile %s PerfStat I/O - %s", namelab.Data(), sellab.
Data());
 
  942   name.Form(
"Norm_%s_PS_MaxIO_%s", namelab.Data(), sellab.
Data());
 
  943   title.
Form(
"Profile %s Normalized PerfStat I/O - %s", namelab.Data(), sellab.
Data());
 
  958   name.Form(
"Prof_%s_QR_IO_%s", namelab.Data(), sellab.
Data());
 
  959   title.
Form(
"Profile %s QueryResult I/O - %s", namelab.Data(), sellab.
Data());
 
  973   name.Form(
"Norm_%s_QR_IO_%s", namelab.Data(), sellab.
Data());
 
  974   title.
Form(
"Profile %s Normalized QueryResult I/O - %s", namelab.Data(), sellab.
Data());
 
  988   name.Form(
"Prof_%s_CPU_eff_%s", namelab.Data(), sellab.
Data());
 
  989   title.
Form(
"Profile %s CPU efficiency - %s", namelab.Data(), sellab.
Data());
 
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
 
const char *const kPROOF_BenchSelDataDef
 
const char *const kPROOF_BenchDataSelPar
 
const char *const kPROOF_BenchParDir
 
R__EXTERN TProof * gProof
 
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
 
R__EXTERN TStyle * gStyle
 
R__EXTERN TSystem * gSystem
 
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
 
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
 
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
 
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
 
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.
 
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...
 
Describe directory structure in memory.
 
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
 
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.
 
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
 
TMap * GetFilesPerServer(const char *exclude=nullptr, Bool_t curronly=kFALSE)
Return a map of TFileCollections with the files on each data server, excluding servers in the comma-s...
 
Int_t Update(Long64_t avgsize=-1)
Update accumulated information about the elements of the collection (e.g.
 
void SetDefaultTreeName(const char *treeName)
 
void Print(Option_t *option="") const override
Prints the contents of the TFileCollection.
 
const char * GetDefaultTreeName() const
Returns the tree set with SetDefaultTreeName if set Returns the name of the first tree in the meta da...
 
Int_t Add(TFileInfo *info)
Add TFileInfo to the collection.
 
Class describing a generic file including meta information.
 
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
 
virtual void SetMaximum(Double_t maximum=-1111)
 
void Draw(Option_t *option="") override
Draw this histogram with options.
 
virtual void SetMinimum(Double_t minimum=-1111)
 
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
 
2-D histogram with a double per channel (see TH1 documentation)}
 
Int_t Fill(Double_t) override
Invalid Fill method.
 
TObject * Remove(TObject *obj) override
Remove object from the list.
 
This class displays a legend box (TPaveText) containing several legend entries.
 
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
 
void Draw(Option_t *option="") override
Draw this legend with its current attributes.
 
void Clear(Option_t *option="") override
Remove all objects from the list.
 
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
 
void Add(TObject *obj) override
 
TObject * Remove(TObject *obj) override
Remove object from the list.
 
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
 
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
 
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
 
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
 
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
 
const char * GetName() const override
Returns name of object.
 
const char * GetTitle() const override
Returns title of object.
 
Mother of all ROOT objects.
 
@ kOverwrite
overwrite existing object with same name
 
virtual const char * GetName() const
Returns name of object.
 
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
 
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
 
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
 
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
 
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
 
EReadType 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.
 
const char * GetTitle() const override
Returns title of object.
 
const char * GetName() const override
Returns name of object.
 
TVirtualPerfStats::EEventType fType
 
Long64_t fEventsProcessed
 
Double_t GetBinContent(Int_t bin) const override
Return bin content of a Profile histogram.
 
Double_t GetBinError(Int_t bin) const override
Return bin error of a Profile histogram.
 
Int_t Fill(const Double_t *v)
 
Handle operations on datasets used by ProofBench.
 
Bool_t IsProof(TProof *p)
 
Int_t ReleaseCache(const char *dset)
Release memory cache for dataset 'dset' Return 0 on success, -1 on error.
 
I/O-intensive PROOF benchmark test reads in event files distributed on the cluster.
 
const char * GetName() const
Returns name of object.
 
TLegend * fProfLegend_evt
 
TFileCollection * GetDataSet(const char *dset, Int_t nact, Bool_t nx)
Get a subsample of dsname suited to run with 'nact' and option 'nx'.
 
TH2 * fHist_perfstat_event
 
TProfile * fProfile_perfstat_IOmax
 
TProfile * fProfile_queryresult_IO
 
TProfile * fNorm_queryresult_event
 
TProfile * fProfile_queryresult_event
 
TProfile * fProfile_perfstat_evtmax
 
TProfile * fNorm_perfstat_evtmax
 
void FillPerfStatProfiles(TTree *t, Int_t nactive)
 
void DrawPerfProfiles()
Get canvas.
 
TProfile * fProfile_perfstat_IO
 
Int_t SetParameters()
Set parameters.
 
TProfile * fProfile_perfstat_event
 
TProofBenchRunDataRead(TProofBenchDataSet *pbds, TPBReadType *readtype=0, TDirectory *dirproofbench=0, TProof *proof=0, TProofNodes *nodes=0, Long64_t nevents=-1, Int_t ntries=2, Int_t start=1, Int_t stop=-1, Int_t step=1, Int_t debug=0)
 
TString GetNameStem() const
Get name for this run.
 
Int_t DeleteParameters()
Delete parameters set for this run.
 
void Print(Option_t *option="") const
Print the content of this object.
 
virtual ~TProofBenchRunDataRead()
Destructor.
 
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_IO
 
TProfile * fProfile_cpu_eff
 
TLegend * fNormLegend_evt
 
TProfile * fNorm_perfstat_IOmax
 
TDirectory * fDirProofBench
 
void Run(Long64_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
 
Abstract base class for PROOF benchmark runs.
 
virtual const char * GetSelName()
 
PROOF worker node information
 
Int_t ActivateWorkers(Int_t nwrks)
Description: Activate 'nwrks' workers; calls TProof::SetParallel and rebuild the internal lists Input...
 
Int_t GetMinWrksPerNode() const
 
void Print(Option_t *option="") const
Description: Print node information.
 
Int_t GetNWorkersCluster() const
 
TMap * GetMapOfActiveNodes() const
 
Int_t GetNActives() const
 
Set of tools to analyse the performance tree.
 
Double_t GetMBRateAvgMax() const
 
Double_t GetEvtRateAvgMax() const
 
This class controls a Parallel ROOT Facility, PROOF, cluster.
 
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file).
 
virtual void Print(Option_t *option="") const
Print status of PROOF cluster.
 
TQueryResult * GetQueryResult(const char *ref=0)
Return pointer to the full TQueryResult instance owned by the player and referenced by 'ref'.
 
virtual Bool_t RegisterDataSet(const char *name, TFileCollection *dataset, const char *optStr="")
Register the 'dataSet' on the cluster under the current user, group and the given 'dataSetName'.
 
void DeleteParameters(const char *wildcard)
Delete the input list parameters specified by a wildcard (e.g.
 
void SetParameter(const char *par, const char *value)
Set input list parameter.
 
virtual Int_t RemoveDataSet(const char *dataset, const char *optStr="")
Remove the specified dataset from the PROOF cluster.
 
TList * GetOutputList()
Get list with all object created during processing (see Process()).
 
virtual TFileCollection * GetDataSet(const char *dataset, const char *optStr="")
Get a list of TFileInfo objects describing the files of the specified dataset.
 
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...
 
virtual Bool_t ExistsDataSet(const char *dataset)
Returns kTRUE if 'dataset' exists, kFALSE otherwise.
 
void ShowDataSet(const char *dataset="", const char *opt="filter:SsCc")
display meta-info for given dataset usi
 
void AddInput(TObject *obj)
Add objects that might be needed during the processing of the selector (see Process()).
 
TList * GetInputList()
Get input list.
 
const char * GetMaster() const
 
Int_t EnablePackage(const char *package, Bool_t notOnClient=kFALSE, TList *workers=0)
Enable specified package.
 
A container class for query results.
 
Long64_t GetEntries() const
 
TDatime GetEndTime() const
 
TDatime GetStartTime() const
 
Float_t GetProcTime() const
 
Float_t GetUsedCPU() const
 
Long64_t GetBytes() const
 
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
 
const char * Data() const
 
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
 
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
 
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
 
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
 
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
 
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
 
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
 
Basic time type with millisecond precision.
 
A TTree represents a columnar dataset.
 
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
 
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=nullptr)
Change branch address, dealing with clone trees properly.
 
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
 
virtual Long64_t GetEntries() const
 
Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0) override
Write this object to the current directory.
 
void SetName(const char *name) override
Change the name of this tree.
 
This class represents a WWW compatible URL.
 
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
 
void SetHost(const char *host)
 
Double_t Sqrt(Double_t x)
Returns the square root of x.