57 fEventsProcessed(0), fBytesRead(0), fLen(0), fLatency(0.0),
fProcTime(0.0), fCpuTime(0.0),
58 fIsStart(
kFALSE), fIsOk(kFALSE)
70 fTimeStamp =
TTimeStamp(fTimeStamp.GetSec() - offset->GetSec(),
71 fTimeStamp.GetNanoSec() - offset->GetNanoSec());
84 Error(
"Compare",
"input is not a TPerfEvent object");
104 where =
"TPerfEvent: StandAlone ";
106 where =
"TPerfEvent: Master ";
121 :
fTrace(0), fPerfEvent(0), fPacketsHist(0), fProcPcktHist(0),
122 fEventsHist(0), fLatencyHist(0),
123 fProcTimeHist(0), fCpuTimeHist(0),
fBytesRead(0),
124 fTotCpuTime(0.), fTotBytesRead(0), fTotEvents(0), fNumEvents(0),
125 fSlaves(0), fDoHist(
kFALSE),
127 fMonitorPerPacket(
kFALSE), fMonSenders(3),
128 fDataSet(
"+++none+++"), fDataSetSize(-1), fOutput(output)
147 for (
Int_t i = 0; i < nwrks; i++) {
158 TIter nextslaveinfo(l);
159 while (
TSlaveInfo *si = dynamic_cast<TSlaveInfo*>(nextslaveinfo()))
162 PDB(kMonitoring,1)
Info(
"TPerfStats",
"Statistics for %d slave(s)",
fSlaves);
169 Info(
"TPerfStats",
"master:%d hist:%d,trace:%d,rate:%d,wrktrace:%d",
173 Int_t perpacket = -1;
176 perpacket =
gEnv->
GetValue(
"Proof.MonitorPerPacket", 0);
180 Info(
"TPerfStats",
"sending full information after each packet");
186 if (!strncmp(o->
ClassName(),
"TDSet", strlen(
"TDSet")))
break;
196 while (dss.
Tokenize(ds, fd,
"[,| ]")) {
197 if ((nq = ds.Index(
"?")) !=
kNPOS) ds.Remove(nq);
198 ds.ReplaceAll(grus,
"");
208 Info(
"TPerfStats",
"dataset string length truncated to %d chars",
fDataSetLen);
217 fTrace =
new TTree(
"PROOF_PerfStats",
"PROOF Statistics");
229 Int_t ntime_bins = 1000;
232 fPacketsHist =
new TH1D(
"PROOF_PacketsHist",
"Packets processed per Worker",
242 fProcPcktHist =
new TH1I(
"PROOF_ProcPcktHist",
"Packets being processed per Worker",
252 fEventsHist =
new TH1D(
"PROOF_EventsHist",
"Events processed per Worker",
262 fNodeHist =
new TH1D(
"PROOF_NodeHist",
"Slaves per Fileserving Node",
272 fLatencyHist =
new TH2D(
"PROOF_LatencyHist",
"GetPacket Latency per Worker",
274 ntime_bins, min_time, time_per_bin);
283 fProcTimeHist =
new TH2D(
"PROOF_ProcTimeHist",
"Packet Processing Time per Worker",
285 ntime_bins, min_time, time_per_bin);
296 ntime_bins, min_time, time_per_bin);
304 nextslaveinfo.
Reset();
306 while (
TSlaveInfo *si = dynamic_cast<TSlaveInfo*>(nextslaveinfo())) {
320 if (deletel)
delete(
l);
334 while (mons.
Tokenize(mon, fmon,
"[,|\\\\]")) {
341 while (mon.Tokenize(tok, from,
" ")) {
352 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TProofMonSender", a[0]))) {
367 Info(
"TPerfStats",
"created monitoring object: %s - # of active monitors: %d",
439 Info(
"PacketEvent",
"%s: fDoHist: %d, fPacketsHist: %p, eventsprocessed: %lld",
461 Error(
"PacketEvent",
"some required object are undefined (%p %p %p %p)",
515 Error(
"PacketEvent",
"sending of summary info failed (%s)", m->
GetName());
517 Warning(
"PacketEvent",
"undefined entry found in monitors array for id: %d", i);
562 pe.
fIsOk = (file != 0);
659 Error(
"WriteQueryLog",
"some required object are undefined (%p %p %p %p)",
712 Error(
"WriteQueryLog",
"sending of summary info failed (%s)", m->
GetName());
715 Error(
"WriteQueryLog",
"sending of dataset info failed (%s)", m->
GetName());
718 Error(
"WriteQueryLog",
"sending of files info failed (%s)", m->
GetName());
720 Warning(
"WriteQueryLog",
"undefined entry found in monitors array for id: %d", i);
732 const char *tags[ntags] = {
"StatsHist",
"StatsTrace",
"SlaveStatsTrace"};
735 for (
Int_t i=0; i<ntags; i++) {
736 varname.
Form(
"Proof.%s", tags[i]);
737 parname.
Form(
"PROOF_%s", tags[i]);
virtual const char * GetName() const
Returns name of object.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
TVirtualPerfStats::EEventType fType
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X")
Set option(s) to draw axis with labels.
Bool_t fDoHist
number of active slaves
TH1D * fEventsHist
histogram of packets being processed per slave
TList * fOutput
Saved pointer to the TDSet object.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
Provides the interface for the PROOF internal performance measurement and event tracing.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Int_t SetSendOptions(const char *)
Parse send options from string 'sendopts'.
TString & ReplaceAll(const TString &s1, const TString &s2)
TObject * GetParameter(const char *par) const
Get specified parameter.
Bool_t TestBit(UInt_t f) const
virtual Int_t Fill()
Fill all branches.
const char * GetGroup() const
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
static const char * EventType(EEventType type)
Return the name of the event type.
TDSet * fDSet
of files in the dataset
Int_t GetNumOfFiles()
Return the number of files in the dataset.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Long_t GetResMemMax(Bool_t master=kFALSE) const
static const char * filename()
virtual void SetMinimum(Double_t minimum=-1111)
TPerfStats(TList *input, TList *output)
Max resident memory used by this process.
Int_t LoadPlugin()
Load the plugin library for this handler.
Int_t GetExitStatus() const
TTimeStamp fTzero
TTree with trace events.
Long64_t fNumEvents
total number of events processed
static Long_t fgVirtMemMax
Saved pointer to the output list.
Long_t GetVirtMemMax(Bool_t master=kFALSE) const
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
void WriteQueryLog()
Send to the connected monitoring servers information related to this query.
void PacketEvent(const char *slave, const char *slavename, const char *filename, Long64_t eventsprocessed, Double_t latency, Double_t proctime, Double_t cputime, Long64_t bytesRead)
Packet event.
TH1D * fNodeHist
histogram of events processed per slave
void RateEvent(Double_t proctime, Double_t deltatime, Long64_t eventsprocessed, Long64_t bytesRead)
Rate event.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
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.
The TNamed class is the base class for all named ROOT classes.
virtual Int_t SendSummary(TList *, const char *)=0
TH2D * fLatencyHist
histogram of slaves per file serving node
TH1D * fPacketsHist
TPerfEvent used to fill tree.
void SimpleEvent(EEventType type)
Simple event.
Bool_t fDoQuota
Full tracing in workers.
const char * AsString(const Option_t *option="") const
Return the date & time as a string.
TObjArray fMonSenders
Whether to send the full entry per each packet.
TQueryResult * GetQueryResult(const char *ref=0)
Return pointer to the full TQueryResult instance owned by the player and referenced by 'ref'...
void SetBytesRead(Long64_t num)
Set number of bytes read.
static void GetMemValues(Long_t &vmax, Long_t &rmax)
Get memory usage.
Double_t fTotCpuTime
track bytes read of main file
Bool_t fDoSlaveTrace
Trace processing rate in master.
A container class for query results.
TList * GetListOfSlaveInfos()
Returns list of TSlaveInfo's. In case of error return 0.
static void Start(TList *input, TList *output)
Initialize PROOF statistics run.
TH1I * fProcPcktHist
histogram of packets processed per slave
void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen)
Record TTree file unzip event.
TString fDataSet
Monitoring engines.
const char * GetSessionTag() const
static void Setup(TList *input)
Setup the PROOF input list with requested statistics and tracing options.
Named parameter, streamable and storable.
Long64_t fTotEvents
total bytes read on all slaves
Bool_t IsEndMaster() const
Bool_t fMonitorPerPacket
Save stats on SQL server for quota management.
virtual Int_t SendDataSetInfo(TDSet *, TList *, const char *, const char *)=0
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
TPerfEvent * fPerfEvent
start time of this run
Long64_t fEventsProcessed
Int_t fSlaves
total number of events to be processed
Long_t ExecPlugin(int nargs, const T &... params)
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual void LabelsDeflate(Option_t *axis="X")
Reduce the number of bins for the axis passed in the option to the number of bins having a label...
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Long64_t fBytesRead
histogram of cpu time spent processing packets
virtual void SetMarkerStyle(Style_t mstyle=1)
Int_t fDataSetSize
Maximum size of the dataset string fDataSet.
void SetStatus(ESlaveStatus stat)
static Long_t fgResMemMax
Max virtual memory used by this process.
virtual TBranch * Bronch(const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
Create a new TTree BranchElement.
Int_t Compare(const TObject *obj) const
Compare method.
R__EXTERN TProof * gProof
Long64_t GetBytesRead() const
Get number of bytes read.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
The TTimeStamp encapsulates seconds and ns since EPOCH.
virtual Int_t SendFileInfo(TDSet *, TList *, const char *, const char *)=0
Int_t fDataSetLen
Dataset string.
virtual void SetBinLabel(Int_t bin, const char *label)
Set label for bin.
Bool_t fDoTrace
Fill histos.
void FileOpenEvent(TFile *file, const char *filename, Double_t start)
Open file event.
virtual UInt_t SetCanExtend(UInt_t extendBitMask)
make the histogram axes extendable / not extendable according to the bit mask returns the previous bi...
Mother of all ROOT objects.
R__EXTERN TProofServ * gProofServ
virtual ~TPerfStats()
Destructor.
virtual void Add(TObject *obj)
Long64_t fTotBytesRead
total cpu time of all slaves
Bool_t fDoTraceRate
Trace details in master.
virtual int GetProcInfo(ProcInfo_t *info) const
Returns cpu and memory used by this process into the ProcInfo_t structure.
Int_t GetEntries() const
Return the number of objects in array (i.e.
TProof * GetProof() const
void FileEvent(const char *slave, const char *slavename, const char *nodename, const char *filename, Bool_t isStart)
File event.
static void Stop()
Terminate the PROOF statistics run.
A TTree object has a header with a name and a title.
const AParamType & GetVal() const
TH2D * fCpuTimeHist
histogram of real time spent processing packets
virtual Int_t GetSize() const
static void output(int code)
const char * GetUser() const
Int_t Fill(Double_t)
Invalid Fill method.
TH2D * fProcTimeHist
histogram of latency due to packet requests
const char * GetOrdinal() const
static void SetMemValues()
Record memory usage.
void FileReadEvent(TFile *file, Int_t len, Double_t start)
Read file event.
void Print(Option_t *option="") const
Dump content of this instance.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
const char * Data() const