55 fEventsProcessed(0), fBytesRead(0), fLen(0), fLatency(0.0), fProcTime(0.0), fCpuTime(0.0),
82 Error(
"Compare",
"input is not a TPerfEvent object");
102 where =
"TPerfEvent: StandAlone ";
104 where =
"TPerfEvent: Master ";
119 :
fTrace(0), fPerfEvent(0), fPacketsHist(0), fProcPcktHist(0),
120 fEventsHist(0), fNodeHist(0), fLatencyHist(0),
121 fProcTimeHist(0), fCpuTimeHist(0), fBytesRead(0),
122 fTotCpuTime(0.), fTotBytesRead(0), fTotEvents(0), fNumEvents(0),
123 fSlaves(0), fDoHist(
kFALSE),
125 fMonitorPerPacket(
kFALSE), fMonSenders(3),
126 fDataSet(
"+++none+++"), fDataSetSize(-1), fOutput(
output)
145 for (
Int_t i = 0; i < nwrks; i++) {
160 PDB(kMonitoring,1)
Info(
"TPerfStats",
"Statistics for %d slave(s)",
fSlaves);
167 Info(
"TPerfStats",
"master:%d hist:%d,trace:%d,rate:%d,wrktrace:%d",
171 Int_t perpacket = -1;
174 perpacket =
gEnv->
GetValue(
"Proof.MonitorPerPacket", 0);
178 Info(
"TPerfStats",
"sending full information after each packet");
184 if (!strncmp(o->
ClassName(),
"TDSet", strlen(
"TDSet")))
break;
194 while (dss.
Tokenize(ds, fd,
"[,| ]")) {
195 if ((nq = ds.Index(
"?")) !=
kNPOS) ds.Remove(nq);
196 ds.ReplaceAll(grus,
"");
206 Info(
"TPerfStats",
"dataset string length truncated to %d chars",
fDataSetLen);
215 fTrace =
new TTree(
"PROOF_PerfStats",
"PROOF Statistics");
227 Int_t ntime_bins = 1000;
230 fPacketsHist =
new TH1D(
"PROOF_PacketsHist",
"Packets processed per Worker",
240 fProcPcktHist =
new TH1I(
"PROOF_ProcPcktHist",
"Packets being processed per Worker",
250 fEventsHist =
new TH1D(
"PROOF_EventsHist",
"Events processed per Worker",
260 fNodeHist =
new TH1D(
"PROOF_NodeHist",
"Slaves per Fileserving Node",
270 fLatencyHist =
new TH2D(
"PROOF_LatencyHist",
"GetPacket Latency per Worker",
272 ntime_bins, min_time, time_per_bin);
281 fProcTimeHist =
new TH2D(
"PROOF_ProcTimeHist",
"Packet Processing Time per Worker",
283 ntime_bins, min_time, time_per_bin);
294 ntime_bins, min_time, time_per_bin);
302 nextslaveinfo.
Reset();
318 if (deletel)
delete(
l);
332 while (mons.
Tokenize(mon, fmon,
"[,|\\\\]")) {
339 while (mon.Tokenize(tok, from,
" ")) {
350 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TProofMonSender",
a[0]))) {
351 if (
h->LoadPlugin() != -1) {
354 a[4].Data(),
a[5].Data(),
a[6].Data(),
355 a[7].Data(),
a[8].Data(),
a[9].Data());
365 Info(
"TPerfStats",
"created monitoring object: %s - # of active monitors: %d",
437 Info(
"PacketEvent",
"%s: fDoHist: %d, fPacketsHist: %p, eventsprocessed: %lld",
459 Error(
"PacketEvent",
"some required object are undefined (%p %p %p %p)",
512 if (
m->SendSummary(&values, identifier) != 0)
513 Error(
"PacketEvent",
"sending of summary info failed (%s)",
m->GetName());
515 Warning(
"PacketEvent",
"undefined entry found in monitors array for id: %d", i);
525 const char *filename,
Bool_t isStart)
657 Error(
"WriteQueryLog",
"some required object are undefined (%p %p %p %p)",
709 if (
m->SendSummary(&values, identifier) != 0)
710 Error(
"WriteQueryLog",
"sending of summary info failed (%s)",
m->GetName());
713 Error(
"WriteQueryLog",
"sending of dataset info failed (%s)",
m->GetName());
716 Error(
"WriteQueryLog",
"sending of files info failed (%s)",
m->GetName());
718 Warning(
"WriteQueryLog",
"undefined entry found in monitors array for id: %d", i);
730 const char *tags[ntags] = {
"StatsHist",
"StatsTrace",
"SlaveStatsTrace"};
733 for (
Int_t i=0; i<ntags; i++) {
734 varname.
Form(
"Proof.%s", tags[i]);
735 parname.
Form(
"PROOF_%s", tags[i]);
R__EXTERN TProofServ * gProofServ
R__EXTERN TProof * gProof
void Printf(const char *fmt,...)
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetBinLabel(Int_t bin, const char *label)
Set label for bin.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
This class implements a data set to be used for PROOF processing.
Int_t GetNumOfFiles()
Return the number of files in the dataset.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
1-D histogram with a double per channel (see TH1 documentation)}
1-D histogram with an int per channel (see TH1 documentation)}
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X")
Set option(s) to draw axis with labels.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual void SetMinimum(Double_t minimum=-1111)
virtual UInt_t SetCanExtend(UInt_t extendBitMask)
Make the histogram axes extendable / not extendable according to the bit mask returns the previous bi...
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.
2-D histogram with a double per channel (see TH1 documentation)}
Int_t Fill(Double_t)
Invalid Fill method.
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
@ kInvalidObject
if object ctor succeeded but object should not be used
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Named parameter, streamable and storable.
const AParamType & GetVal() const
TVirtualPerfStats::EEventType fType
void Print(Option_t *option="") const
Dump content of this instance.
TPerfEvent(TTimeStamp *offset=0)
Constructor.
Int_t Compare(const TObject *obj) const
Compare method.
Long64_t fEventsProcessed
Provides the interface for the PROOF internal performance measurement and event tracing.
void SimpleEvent(EEventType type)
Simple event.
TString fDataSet
Monitoring engines.
void RateEvent(Double_t proctime, Double_t deltatime, Long64_t eventsprocessed, Long64_t bytesRead)
Rate event.
static Long_t fgResMemMax
Max virtual memory used by this process.
Int_t fDataSetLen
Dataset string.
TPerfEvent * fPerfEvent
start time of this run
Long64_t fBytesRead
histogram of cpu time spent processing packets
void FileOpenEvent(TFile *file, const char *filename, Double_t start)
Open file event.
void FileEvent(const char *slave, const char *slavename, const char *nodename, const char *filename, Bool_t isStart)
File event.
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.
void FileReadEvent(TFile *file, Int_t len, Double_t start)
Read file event.
TPerfStats(TList *input, TList *output)
Max resident memory used by this process.
static Long_t fgVirtMemMax
Saved pointer to the output list.
TH1D * fPacketsHist
TPerfEvent used to fill tree.
TList * fOutput
Saved pointer to the TDSet object.
Long64_t fNumEvents
total number of events processed
Int_t fDataSetSize
Maximum size of the dataset string fDataSet.
TH2D * fCpuTimeHist
histogram of real time spent processing packets
static void SetMemValues()
Record memory usage.
void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen)
Record TTree file unzip event.
TH1D * fNodeHist
histogram of events processed per slave
void WriteQueryLog()
Send to the connected monitoring servers information related to this query.
static void Setup(TList *input)
Setup the PROOF input list with requested statistics and tracing options.
Bool_t fDoTraceRate
Trace details in master.
Long64_t GetBytesRead() const
Get number of bytes read.
TH2D * fProcTimeHist
histogram of latency due to packet requests
virtual ~TPerfStats()
Destructor.
TH2D * fLatencyHist
histogram of slaves per file serving node
TH1I * fProcPcktHist
histogram of packets processed per slave
static void Stop()
Terminate the PROOF statistics run.
Bool_t fDoTrace
Fill histos.
Double_t fTotCpuTime
track bytes read of main file
TH1D * fEventsHist
histogram of packets being processed per slave
Bool_t fDoHist
number of active slaves
static void GetMemValues(Long_t &vmax, Long_t &rmax)
Get memory usage.
Long64_t fTotEvents
total bytes read on all slaves
TTimeStamp fTzero
TTree with trace events.
void SetBytesRead(Long64_t num)
Set number of bytes read.
static void Start(TList *input, TList *output)
Initialize PROOF statistics run.
Bool_t fDoSlaveTrace
Trace processing rate in master.
Bool_t fMonitorPerPacket
Save stats on SQL server for quota management.
Long64_t fTotBytesRead
total cpu time of all slaves
TObjArray fMonSenders
Whether to send the full entry per each packet.
Int_t fSlaves
total number of events to be processed
Bool_t fDoQuota
Full tracing in workers.
Provides the interface for PROOF monitoring to different writers.
Int_t SetSendOptions(const char *)
Parse send options from string 'sendopts'.
const char * GetOrdinal() const
const char * GetUser() const
TProof * GetProof() const
const char * GetGroup() const
Bool_t IsEndMaster() const
const char * GetSessionTag() const
This class controls a Parallel ROOT Facility, PROOF, cluster.
TObject * GetParameter(const char *par) const
Get specified parameter.
TQueryResult * GetQueryResult(const char *ref=0)
Return pointer to the full TQueryResult instance owned by the player and referenced by 'ref'.
TList * GetListOfSlaveInfos()
Returns list of TSlaveInfo's. In case of error return 0.
A container class for query results.
void SetStatus(ESlaveStatus stat)
This class holds the status of an ongoing operation and collects error messages.
Int_t GetExitStatus() const
Long_t GetResMemMax(Bool_t master=kFALSE) const
Long_t GetVirtMemMax(Bool_t master=kFALSE) const
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
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.
virtual int GetProcInfo(ProcInfo_t *info) const
Returns cpu and memory used by this process into the ProcInfo_t structure.
The TTimeStamp encapsulates seconds and ns since EPOCH.
const char * AsString(const Option_t *option="") const
Return the date & time as a string.
A TTree represents a columnar dataset.
virtual Int_t Fill()
Fill all branches.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
virtual TBranch * Bronch(const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
Create a new TTree BranchElement.
Provides the interface for the PROOF internal performance measurement and event tracing.
static const char * EventType(EEventType type)
Return the name of the event type.
static constexpr double pi
static void output(int code)