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)
    78    if (!fProof) fProof = 
gProof;
    85    fNodes->GetMapOfActiveNodes()->Print();
    87    if (stop == -1) fStop = fNodes->GetNWorkersCluster();
    89    fListPerfPlots = 
new TList;
   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;
   165 #ifdef R__HAVE_CONFIG   170          Info(
"Run", 
"Uploading '%s' ...", par.
Data());
   172             Error(
"Run", 
"problems uploading '%s' - cannot continue", par.
Data());
   182             Error(
"Run", 
"you should load the class '%s' before running the benchmark", 
fSelName.
Data());
   188                Info(
"Run", 
"Uploading '%s' ...", par.
Data());
   190                   Error(
"Run", 
"problems uploading '%s' - cannot continue", par.
Data());
   193                Info(
"Run", 
"Enabling '%s' ...", par.
Data());
   195                   Error(
"Run", 
"problems enabling '%s' - cannot continue", par.
Data());
   225    Info(
"Run", 
"Running IO-bound tests on dataset '%s'; %d ~ %d active worker(s),"   226                " every %d worker(s).", dset, start, stop, step);
   234    Double_t ymi = -1., ymx = -1., emx =- 1, ymiio = -1., ymxio = -1., mbmx = -1.;
   235    for (
Int_t nactive = start; nactive <= stop; nactive += step) {
   238       Int_t ncoren = (nactive < ncores) ? nactive : ncores;
   244          workers.
Form(
"%dx", nactive);
   250          Error(
"Run", 
"could not activate the requested number of"   251                       " workers/node on the cluster; skipping the test point"   252                       " (%d workers/node)", nactive);
   260          Error(
"Run", 
"could not retrieve dataset '%s'", dsname.
Data());
   268       for (
Int_t j=0; j<ntries; j++) {
   271             Info(
"Run", 
"Running IO-bound tests with %d active worker(s)/node;"   272                         " trial %d/%d", nactive, j + 1, ntries);
   274             Info(
"Run", 
"Running IO-bound tests with %d active worker(s);"   275                         " trial %d/%d", nactive, j + 1, ntries);
   285          Info(
"Run", 
"Processing data set %s with"   286                      " %d active worker(s).", dsn.
Data(), nactive);
   298          TString perfstats_name = 
"PROOF_PerfStats";
   326             Double_t nert = nx ? pf_eventrate/nactive/nnodes : pf_eventrate/nactive;
   331             if (dy / y1 < 0.2) dy = y1 * 0.2;
   332             if (dy > y1) dy = y1*.999999;
   333             if (ymi < 0.) ymi = y1 - dy;
   336             if (ymx < 0.) ymx = y1 + dy;
   345             Double_t niort = nx ? pf_IOrate/nactive/nnodes : pf_IOrate/nactive;
   350             if (dy / y1 < 0.2) dy = y1 * 0.2;
   351             if (dy > y1) dy = y1*.999999;
   352             if (ymiio < 0.) ymiio = y1 - dy;
   355             if (ymxio < 0.) ymxio = y1 + dy;
   370                TString dirn = nx ? 
"RunDataReadx" : 
"RunDataRead";
   378                   Warning(
"Run", 
"cannot cd to subdirectory '%s' to store the results!", dirn.
Data());
   384                Warning(
"Run", 
"%s: tree not found", perfstats_name.
Data());
   386                Error(
"Run", 
"PROOF output list is empty!");
   390          const char *drawopt = t ? 
"SAME" : 
"";
   404                qr_cpu_eff = queryresult->
GetUsedCPU() / ncoren / qr_proc ;
   406                Printf(
"cpu_eff: %f", qr_cpu_eff);
   412             qr_eventrate = qr_entries / 
Double_t(qr_proc);
   413             if (qr_eventrate > emx) emx = qr_eventrate;
   425             const Double_t Dmegabytes = 1024*1024;
   427             qr_IOrate = qr_bytes / Dmegabytes / 
Double_t(qr_proc);
   428             if (qr_IOrate > mbmx) mbmx = qr_IOrate;
   439             Double_t nert = nx ? qr_eventrate/nactive/nnodes : qr_eventrate/nactive;
   444             if (dy / y1 < 0.2) dy = y1 * 0.2;
   445             if (dy > y1) dy = y1*.999999;
   446             if (ymi < 0.) ymi = y1 - dy;
   449             if (ymx < 0.) ymx = y1 + dy;
   459             Double_t niort = nx ? qr_IOrate/nactive/nnodes : qr_IOrate/nactive;
   464             if (dy / y1 < 0.2) dy = y1 * 0.2;
   465             if (dy > y1) dy = y1*.999999;
   466             if (ymiio < 0.) ymiio = y1 - dy;
   469             if (ymxio < 0.) ymxio = y1 + dy;
   510       TString dirn = nx ? 
"RunDataReadx" : 
"RunDataRead";
   518          Warning(
"Run", 
"cannot cd to subdirectory '%s' to store the results!", dirn.
Data());
   536       Error(
"GetDataSet", 
"dataset '%s' does not exist", dset);
   543       Error(
"GetDataSet", 
"dataset '%s' could not be retrieved", dset);
   550 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,30,0)   557       Error(
"GetDataSet", 
"problems classifying info on per-server base");
   567       Error(
"GetDataSet", 
"problems getting map of active nodes");
   586    while ((key = nxnd())) {
   589       while ((ksrv = nxsrv())) {
   591          if (
TString(urlsrv.GetHostFQDN()).IsNull())
   594              !strcmp(urlsrv.GetHostFQDN(), 
TUrl(key->
GetName()).GetHostFQDN())) {
   595             if ((xfc = dynamic_cast<TFileCollection *>(mpref->
GetValue(ksrv)))) {
   596                if ((lswrks = dynamic_cast<TList *>(mpnodes->
GetValue(key)))) {
   605                   Warning(
"GetDataSet", 
"could not attach to worker list for node '%s'",
   609                Warning(
"GetDataSet", 
"could not attach to file collection for server '%s'",
   651    const Double_t Dmegabytes = 1024.*1024.;
   655    for (
Long64_t k=0; k<entries; k++) {
   694       Printf(
"Performance Profiles Canvas: Name = %s Title = %s",
   716       nside = (nside*nside < nprofiles) ? nside + 1 : nside;
   723    while ((profile=(
TProfile*)(nxt()))){
   736    TString namestem(
"+++undef+++");
   761       Error(
"SetParameters", 
"Proof not set; Doing nothing");
   778       Error(
"DeleteParameters", 
"Proof not set; Doing nothing");
   795    Int_t quotient = (stop - start) / step;
   796    Int_t ndiv = quotient + 1;
   798    Double_t ns_max = quotient*step + start + step/2.;
   807       axtitle = 
"Active Workers/Node";
   808       namelab.Form(
"x_%s", 
GetName());
   816    name.
Form(
"Prof_%s_PS_MaxEvts_%s", namelab.Data(), sellab.
Data());
   817    title.
Form(
"Profile %s PerfStat Event- %s", namelab.Data(), sellab.
Data());
   832    name.
Form(
"Prof_%s_PS_Evts_%s", namelab.Data(), sellab.
Data());
   833    title.
Form(
"Profile %s PerfStat Event - %s", namelab.Data(), sellab.
Data());
   846    name.
Form(
"Hist_%s_PS_Evts_%s", namelab.Data(), sellab.
Data());
   847    title.
Form(
"Histogram %s PerfStat Event - %s", namelab.Data(), sellab.
Data());
   860    name.
Form(
"Norm_%s_PF_MaxEvts_%s", namelab.Data(), sellab.
Data());
   861    title.
Form(
"Profile %s Normalized QueryResult Event - %s", namelab.Data(), sellab.
Data());
   876    name.
Form(
"Prof_%s_QR_Evts_%s", namelab.Data(), sellab.
Data());
   877    title.
Form(
"Profile %s QueryResult Event - %s", namelab.Data(), sellab.
Data());
   891    name.
Form(
"Norm_%s_QR_Evts_%s", namelab.Data(), sellab.
Data());
   892    title.
Form(
"Profile %s Normalized QueryResult Event - %s", namelab.Data(), sellab.
Data());
   906    name.
Form(
"Prof_%s_PS_IO_%s", namelab.Data(), sellab.
Data());
   907    title.
Form(
"Profile %s PerfStat I/O %s", namelab.Data(), sellab.
Data());
   920    name.
Form(
"Hist_%s_PS_IO_%s", namelab.Data(), sellab.
Data());
   921    title.
Form(
"Histogram %s PerfStat I/O - %s", namelab.Data(), sellab.
Data());
   934    name.
Form(
"Prof_%s_PS_MaxIO_%s", namelab.Data(), sellab.
Data());
   935    title.
Form(
"Profile %s PerfStat I/O - %s", namelab.Data(), sellab.
Data());
   950    name.
Form(
"Norm_%s_PS_MaxIO_%s", namelab.Data(), sellab.
Data());
   951    title.
Form(
"Profile %s Normalized PerfStat I/O - %s", namelab.Data(), sellab.
Data());
   966    name.
Form(
"Prof_%s_QR_IO_%s", namelab.Data(), sellab.
Data());
   967    title.
Form(
"Profile %s QueryResult I/O - %s", namelab.Data(), sellab.
Data());
   981    name.
Form(
"Norm_%s_QR_IO_%s", namelab.Data(), sellab.
Data());
   982    title.
Form(
"Profile %s Normalized QueryResult I/O - %s", namelab.Data(), sellab.
Data());
   996    name.
Form(
"Prof_%s_CPU_eff_%s", namelab.Data(), sellab.
Data());
   997    title.
Form(
"Profile %s CPU efficiency - %s", namelab.Data(), sellab.
Data());
 
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root. 
 
virtual const char * GetName() const
Returns name of object. 
 
Long64_t GetEntries() const
 
Int_t SetParameters()
Set parameters. 
 
TVirtualPerfStats::EEventType fType
 
void Print(Option_t *option="") const
Print the content of this object. 
 
Abstract base class for PROOF benchmark runs. 
 
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message. 
 
const char * GetDefaultTreeName() const
Returns the tree set with SetDefaultTreeName if set Returns the name of the first tree in the meta da...
 
virtual void SetMaximum(Double_t maximum=-1111)
 
This class displays a legend box (TPaveText) containing several legend entries. 
 
virtual Bool_t ExistsDataSet(const char *dataset)
Returns kTRUE if 'dataset' exists, kFALSE otherwise. 
 
Int_t EnablePackage(const char *package, Bool_t notOnClient=kFALSE, TList *workers=0)
Enable specified package. 
 
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'...
 
TProfile * fProfile_cpu_eff
 
TProfile * fProfile_perfstat_IO
 
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
 
This class represents a WWW compatible URL. 
 
R__EXTERN TStyle * gStyle
 
Bool_t TestBit(UInt_t f) const
 
Bool_t IsProof(TProof *p)
 
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content. 
 
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes. 
 
Double_t GetMBRateAvgMax() const
 
void SetParameter(const char *par, const char *value)
Set input list parameter. 
 
Set of tools to analyse the performance tree. 
 
TProfile * fNorm_queryresult_event
 
TDatime GetStartTime() const
 
void FillPerfStatProfiles(TTree *t, Int_t nactive)
 
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad. 
 
virtual TFileCollection * GetDataSet(const char *dataset, const char *optStr="")
Get a list of TFileInfo objects describing the files of the specified dataset. 
 
const char * GetName() const
Returns name of object. 
 
TList * GetOutputList()
Get list with all object created during processing (see Process()). 
 
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. 
 
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory and return a pointer to the created directory. 
 
const char *const kPROOF_BenchParDir
 
Handle operations on datasets used by ProofBench. 
 
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad. 
 
Basic time type with millisecond precision. 
 
TProfile * fProfile_perfstat_evtmax
 
overwrite existing object with same name 
 
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name. 
 
void Run(Long64_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t)
 
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=0)
Set the value of a resource or create a new resource. 
 
void Print(Option_t *option="") const
Description: Print node information. 
 
static struct mg_connection * fc(struct mg_context *ctx)
 
Int_t Update(Long64_t avgsize=-1)
Update accumulated information about the elements of the collection (e.g. 
 
virtual void Print(Option_t *option="") const
Print status of PROOF cluster. 
 
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
 
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly. 
 
virtual Bool_t IsWritable() const
 
Float_t GetProcTime() const
 
virtual const char * GetSelName()
 
Long64_t GetBytes() const
 
Int_t DeleteParameters()
Delete parameters set for this run. 
 
const char * GetTitle() const
Returns title of object. 
 
void ShowDataSet(const char *dataset="", const char *opt="filter:SsCc")
display meta-info for given dataset usi 
 
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color. 
 
void Clear(Option_t *option="")
Remove all primitives from the canvas. 
 
std::vector< std::vector< double > > Data
 
virtual Double_t GetBinContent(Int_t bin) const
Return bin content of a Profile histogram. 
 
TLegend * fNormLegend_evt
 
Double_t GetEvtRateAvgMax() const
 
TQueryResult * GetQueryResult(const char *ref=0)
Return pointer to the full TQueryResult instance owned by the player and referenced by 'ref'...
 
Int_t GetNActives() const
 
Int_t ReleaseCache(const char *dset)
Release memory cache for dataset 'dset' Return 0 on success, -1 on error. 
 
A container class for query results. 
 
virtual Double_t GetBinError(Int_t bin) const
Return bin error of a Profile histogram. 
 
TProfile * fProfile_queryresult_IO
 
const char *const kPROOF_BenchSelDataDef
 
Int_t UploadPackage(const char *par, EUploadPackageOpt opt=kUntar, TList *workers=0)
Upload a PROOF archive (PAR file). 
 
EReadType GetType() const
 
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995. 
 
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory. 
 
const char *const kPROOF_BenchDataSelPar
 
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty. 
 
TProfile * fProfile_perfstat_IOmax
 
R__EXTERN TSystem * gSystem
 
virtual void Draw(Option_t *option="")
Draw this histogram with options. 
 
Long64_t fEventsProcessed
 
Int_t Add(TFileInfo *info)
Add TFileInfo to the collection. 
 
TFileCollection * GetDataSet(const char *dset, Int_t nact, Bool_t nx)
Get a subsample of dsname suited to run with 'nact' and option 'nx'. 
 
void Print(Option_t *option="") const
Prints the contents of the TFileCollection. 
 
virtual TObject * Remove(TObject *obj)
Remove object from the list. 
 
TObject * Remove(TObject *obj)
Remove object from the list. 
 
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor. 
 
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message. 
 
TMap * GetMapOfActiveNodes() const
 
Int_t Fill(const Double_t *v)
 
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style. 
 
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...
 
TString GetNameStem() const
Get name for this run. 
 
virtual const char * GetPath() const
Returns the full path of the directory. 
 
Float_t GetUsedCPU() const
 
void AddInput(TObject *obj)
Add objects that might be needed during the processing of the selector (see Process()). 
 
void SetHost(const char *host)
 
TList * GetInputList()
Get input list. 
 
TProfile * fNorm_perfstat_evtmax
 
R__EXTERN TProof * gProof
 
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString. 
 
void DrawPerfProfiles()
Get canvas. 
 
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory. 
 
void SetDefaultTreeName(const char *treeName)
 
void DeleteParameters(const char *wildcard)
Delete the input list parameters specified by a wildcard (e.g. 
 
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend. 
 
Int_t ActivateWorkers(Int_t nwrks)
Description: Activate 'nwrks' workers; calls TProof::SetParallel and rebuild the internal lists Input...
 
TDirectory * fDirProofBench
 
Describe directory structure in memory. 
 
const char * GetMaster() const
 
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
 
This class controls a Parallel ROOT Facility, PROOF, cluster. 
 
TProfile * fProfile_queryresult_event
 
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
 
THist< 2, double, THistStatContent, THistStatUncertainty > TH2D
 
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. 
 
virtual void Clear(Option_t *option="")
Remove all objects from the list. 
 
virtual Long64_t GetEntries() const
 
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility. 
 
Int_t GetMinWrksPerNode() const
 
Mother of all ROOT objects. 
 
TProfile * fNorm_perfstat_IOmax
 
TLegend * fProfLegend_evt
 
TProfile * fNorm_queryresult_IO
 
TDatime GetEndTime() const
 
void BuildHistos(Int_t start, Int_t stop, Int_t step, Bool_t nx)
Build histograms, profiles and graphs needed for this run. 
 
const char * GetName() const
Returns name of object. 
 
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory. 
 
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)
 
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
 
virtual TDirectory * GetDirectory(const char *namecycle, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory using apath. 
 
TProfile * fProfile_perfstat_event
 
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
 
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key. 
 
A TTree object has a header with a name and a title. 
 
Class describing a generic file including meta information. 
 
Double_t Sqrt(Double_t x)
 
virtual Int_t RemoveDataSet(const char *dataset, const char *optStr="")
Remove the specified dataset from the PROOF cluster. 
 
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1). 
 
virtual const char * GetName() const
Returns name of object. 
 
virtual Int_t GetSize() const
 
Int_t Fill(Double_t)
Invalid Fill method. 
 
virtual void SetTitle(const char *title="")
Set the title of the TNamed. 
 
TMap * GetFilesPerServer(const char *exclude=0, Bool_t curronly=kFALSE)
Return a map of TFileCollections with the files on each data server, excluding servers in the comma-s...
 
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write all objects in this collection. 
 
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message. 
 
I/O-intensive PROOF benchmark test reads in event files distributed on the cluster. 
 
PROOF worker node information. 
 
virtual void SetName(const char *name)
Change the name of this tree. 
 
virtual const char * GetTitle() const
Returns title of object. 
 
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
 
virtual ~TProofBenchRunDataRead()
Destructor. 
 
const char * Data() const
 
TH2 * fHist_perfstat_event