#ifndef ROOT_TPerfStats
#define ROOT_TPerfStats
#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TObjArray
#include "TObjArray.h"
#endif
#ifndef ROOT_TTimeStamp
#include "TTimeStamp.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
#ifndef ROOT_TVirtualPerfStats
#include "TVirtualPerfStats.h"
#endif
class TDSet;
class TH1D;
class TH1I;
class TH2D;
class TList;
class TTree;
class TPerfEvent : public TObject {
public:
TString fEvtNode;
TTimeStamp fTimeStamp;
TVirtualPerfStats::EEventType fType;
TString fSlaveName;
TString fNodeName;
TString fFileName;
TString fFileClass;
TString fSlave;
Long64_t fEventsProcessed;
Long64_t fBytesRead;
Long64_t fLen;
Double_t fLatency;
Double_t fProcTime;
Double_t fCpuTime;
Bool_t fIsStart;
Bool_t fIsOk;
TPerfEvent(TTimeStamp *offset = 0);
virtual ~TPerfEvent() {}
Bool_t IsSortable() const { return kTRUE; }
Int_t Compare(const TObject *obj) const;
void Print(Option_t *option="") const;
ClassDef(TPerfEvent,3)
};
class TPerfStats : public TVirtualPerfStats {
friend class TProofMonSender;
private:
TTree *fTrace;
TTimeStamp fTzero;
TPerfEvent *fPerfEvent;
TH1D *fPacketsHist;
TH1I *fProcPcktHist;
TH1D *fEventsHist;
TH1D *fNodeHist;
TH2D *fLatencyHist;
TH2D *fProcTimeHist;
TH2D *fCpuTimeHist;
Long64_t fBytesRead;
Double_t fTotCpuTime;
Long64_t fTotBytesRead;
Long64_t fTotEvents;
Long64_t fNumEvents;
Int_t fSlaves;
Bool_t fDoHist;
Bool_t fDoTrace;
Bool_t fDoTraceRate;
Bool_t fDoSlaveTrace;
Bool_t fDoQuota;
Bool_t fMonitorPerPacket;
TObjArray fMonSenders;
TString fDataSet;
Int_t fDataSetLen;
Int_t fDataSetSize;
TDSet *fDSet;
TList *fOutput;
static Long_t fgVirtMemMax;
static Long_t fgResMemMax;
TPerfStats(TList *input, TList *output);
void WriteQueryLog();
public:
virtual ~TPerfStats();
void SimpleEvent(EEventType type);
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);
void FileEvent(const char *slave, const char *slavename, const char *nodename, const char *filename,
Bool_t isStart);
void FileOpenEvent(TFile *file, const char *filename, Double_t start);
void FileReadEvent(TFile *file, Int_t len, Double_t start);
void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen);
void RateEvent(Double_t proctime, Double_t deltatime,
Long64_t eventsprocessed, Long64_t bytesRead);
void SetBytesRead(Long64_t num);
Long64_t GetBytesRead() const;
void SetNumEvents(Long64_t num) { fNumEvents = num; }
Long64_t GetNumEvents() const { return fNumEvents; }
static void Start(TList *input, TList *output);
static void Stop();
static void Setup(TList *input);
static void SetMemValues();
static void GetMemValues(Long_t &vmax, Long_t &rmax);
ClassDef(TPerfStats,0)
};
#endif