ROOT
6.06/09
Reference Guide
|
TTree I/O performance measurement.
see example of use below.
The function FileReadEvent is called from TFile::ReadBuffer. For each call the following information is stored in fGraphIO
Example of use:
then, in a root interactive session, one can do:
The Draw or Print functions print the following information:
The ReadTotal value indicates the effective number of zipped bytes returned to the application. The physical number of bytes read from the device (as measured for example with strace) is ReadTotal +ReadTotal*Readextra/100. Same for ReadSize.
A consequence of NOTE1, the Disk I/O speed corresponds to the effective number of bytes returned to the application per second. The Physical disk speed is DiskIO + DiskIO*ReadExtra/100.
Definition at line 40 of file TTreePerfStats.h.
Public Member Functions | |
TTreePerfStats () | |
TTreePerfStats (const char *name, TTree *T) | |
Create a TTree I/O perf stats object. More... | |
virtual | ~TTreePerfStats () |
Destructor. More... | |
virtual void | Browse (TBrowser *b) |
Browse. More... | |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
Return distance to one of the objects in the TTreePerfStats. More... | |
virtual void | Draw (Option_t *option="") |
Draw the TTree I/O perf graph. More... | |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
Return distance to one of the objects in the TTreePerfStats. More... | |
virtual void | Finish () |
When the run is finished this function must be called to save the current parameters in the file and Tree in this object the function is automatically called by Draw and Print. More... | |
virtual Long64_t | GetBytesRead () const |
virtual Long64_t | GetBytesReadExtra () const |
virtual Double_t | GetCpuTime () const |
virtual Double_t | GetDiskTime () const |
TGraphErrors * | GetGraphIO () |
TGraphErrors * | GetGraphTime () |
const char * | GetHostInfo () const |
const char * | GetName () const |
Returns name of object. More... | |
virtual Int_t | GetNleaves () const |
virtual Long64_t | GetNumEvents () const |
TPaveText * | GetPave () |
virtual Int_t | GetReadaheadSize () const |
virtual Int_t | GetReadCalls () const |
virtual Double_t | GetRealTime () const |
TStopwatch * | GetStopwatch () const |
virtual Int_t | GetTreeCacheSize () const |
virtual Double_t | GetUnzipTime () const |
virtual void | Paint (Option_t *chopt="") |
Draw the TTree I/O perf graph. More... | |
virtual void | Print (Option_t *option="") const |
Print the TTree I/O perf stats. More... | |
virtual void | SimpleEvent (EEventType) |
virtual void | PacketEvent (const char *, const char *, const char *, Long64_t, Double_t, Double_t, Double_t, Long64_t) |
virtual void | FileEvent (const char *, const char *, const char *, const char *, Bool_t) |
virtual void | FileOpenEvent (TFile *, const char *, Double_t) |
virtual void | FileReadEvent (TFile *file, Int_t len, Double_t start) |
Record TTree file read event. More... | |
virtual void | UnzipEvent (TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen) |
Record TTree unzip event. More... | |
virtual void | RateEvent (Double_t, Double_t, Long64_t, Long64_t) |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
Save this object to filename. More... | |
virtual void | SavePrimitive (std::ostream &out, Option_t *option="") |
Save primitive as a C++ statement(s) on output stream out. More... | |
virtual void | SetBytesRead (Long64_t nbytes) |
virtual void | SetBytesReadExtra (Long64_t nbytes) |
virtual void | SetCompress (Double_t cx) |
virtual void | SetDiskTime (Double_t t) |
virtual void | SetNumEvents (Long64_t) |
virtual void | SetCpuTime (Double_t cptime) |
virtual void | SetGraphIO (TGraphErrors *gr) |
virtual void | SetGraphTime (TGraphErrors *gr) |
virtual void | SetHostInfo (const char *info) |
virtual void | SetName (const char *name) |
virtual void | SetNleaves (Int_t nleaves) |
virtual void | SetReadaheadSize (Int_t nbytes) |
virtual void | SetReadCalls (Int_t ncalls) |
virtual void | SetRealNorm (Double_t rnorm) |
virtual void | SetRealTime (Double_t rtime) |
virtual void | SetTreeCacheSize (Int_t nbytes) |
virtual void | SetUnzipTime (Double_t uztime) |
Public Member Functions inherited from TVirtualPerfStats | |
virtual | ~TVirtualPerfStats () |
Public Member Functions inherited from TObject | |
TObject () | |
TObject (const TObject &object) | |
TObject copy ctor. More... | |
TObject & | operator= (const TObject &rhs) |
TObject assignment operator. More... | |
virtual | ~TObject () |
TObject destructor. More... | |
virtual void | AppendPad (Option_t *option="") |
Append graphics object to current pad. More... | |
virtual const char * | ClassName () const |
Returns name of class to which the object belongs. More... | |
virtual void | Clear (Option_t *="") |
virtual TObject * | Clone (const char *newname="") const |
Make a clone of an object using the Streamer facility. More... | |
virtual Int_t | Compare (const TObject *obj) const |
Compare abstract method. More... | |
virtual void | Copy (TObject &object) const |
Copy this to obj. More... | |
virtual void | Delete (Option_t *option="") |
Delete this object. More... | |
virtual void | DrawClass () const |
Draw class inheritance tree of the class to which this object belongs. More... | |
virtual TObject * | DrawClone (Option_t *option="") const |
Draw a clone of this object in the current pad. More... | |
virtual void | Dump () const |
Dump contents of object on stdout. More... | |
virtual void | Execute (const char *method, const char *params, Int_t *error=0) |
Execute method on this object with the given parameter string, e.g. More... | |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=0) |
Execute method on this object with parameters stored in the TObjArray. More... | |
virtual TObject * | FindObject (const char *name) const |
Must be redefined in derived classes. More... | |
virtual TObject * | FindObject (const TObject *obj) const |
Must be redefined in derived classes. More... | |
virtual Option_t * | GetDrawOption () const |
Get option used by the graphics system to draw this object. More... | |
virtual UInt_t | GetUniqueID () const |
Return the unique object id. More... | |
virtual const char * | GetIconName () const |
Returns mime type name of object. More... | |
virtual Option_t * | GetOption () const |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
Returns string containing info about the object at position (px,py). More... | |
virtual const char * | GetTitle () const |
Returns title of object. More... | |
virtual Bool_t | HandleTimer (TTimer *timer) |
Execute action in response of a timer timing out. More... | |
virtual ULong_t | Hash () const |
Return hash value for this object. More... | |
virtual Bool_t | InheritsFrom (const char *classname) const |
Returns kTRUE if object inherits from class "classname". More... | |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
Returns kTRUE if object inherits from TClass cl. More... | |
virtual void | Inspect () const |
Dump contents of this object in a graphics canvas. More... | |
virtual Bool_t | IsFolder () const |
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More... | |
virtual Bool_t | IsEqual (const TObject *obj) const |
Default equal comparison (objects are equal if they have the same address in memory). More... | |
virtual Bool_t | IsSortable () const |
Bool_t | IsOnHeap () const |
Bool_t | IsZombie () const |
virtual Bool_t | Notify () |
This method must be overridden to handle object notification. More... | |
virtual void | ls (Option_t *option="") const |
The ls function lists the contents of a class on stdout. More... | |
virtual void | Pop () |
Pop on object drawn in a pad to the top of the display list. More... | |
virtual Int_t | Read (const char *name) |
Read contents of object with specified name from the current directory. More... | |
virtual void | RecursiveRemove (TObject *obj) |
Recursively remove this object from a list. More... | |
virtual void | SetDrawOption (Option_t *option="") |
Set drawing option for object. More... | |
virtual void | SetUniqueID (UInt_t uid) |
Set the unique object id. More... | |
virtual void | UseCurrentStyle () |
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) |
Write this object to the current directory. More... | |
virtual Int_t | Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const |
Write this object to the current directory. More... | |
void * | operator new (size_t sz) |
void * | operator new[] (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz, void *vp) |
void | operator delete (void *ptr) |
Operator delete. More... | |
void | operator delete[] (void *ptr) |
Operator delete []. More... | |
void | SetBit (UInt_t f, Bool_t set) |
Set or unset the user status bits as specified in f. More... | |
void | SetBit (UInt_t f) |
void | ResetBit (UInt_t f) |
Bool_t | TestBit (UInt_t f) const |
Int_t | TestBits (UInt_t f) const |
void | InvertBit (UInt_t f) |
virtual void | Info (const char *method, const char *msgfmt,...) const |
Issue info message. More... | |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
Issue warning message. More... | |
virtual void | Error (const char *method, const char *msgfmt,...) const |
Issue error message. More... | |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
Issue system error message. More... | |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
Issue fatal error message. More... | |
void | AbstractMethod (const char *method) const |
Use this method to implement an "abstract" method that you don't want to leave purely abstract. More... | |
void | MayNotUse (const char *method) const |
Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More... | |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
Use this method to declare a method obsolete. More... | |
Protected Attributes | |
Int_t | fTreeCacheSize |
Int_t | fNleaves |
Int_t | fReadCalls |
Int_t | fReadaheadSize |
Long64_t | fBytesRead |
Long64_t | fBytesReadExtra |
Double_t | fRealNorm |
Double_t | fRealTime |
Double_t | fCpuTime |
Double_t | fDiskTime |
Double_t | fUnzipTime |
Double_t | fCompress |
TString | fName |
TString | fHostInfo |
TFile * | fFile |
TTree * | fTree |
pointer to the file containing the Tree More... | |
TGraphErrors * | fGraphIO |
pointer to the Tree being monitored More... | |
TGraphErrors * | fGraphTime |
TPaveText * | fPave |
TStopwatch * | fWatch |
TGaxis * | fRealTimeAxis |
TText * | fHostInfoText |
Additional Inherited Members | |
Public Types inherited from TVirtualPerfStats | |
enum | EEventType { kUnDefined, kPacket, kStart, kStop, kFile, kFileOpen, kFileRead, kRate, kNumEventType } |
Public Types inherited from TObject | |
enum | EStatusBits { kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4), kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13) } |
enum | { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff } |
enum | { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) } |
Static Public Member Functions inherited from TVirtualPerfStats | |
static TVirtualPerfStats *& | CurrentPerfStats () |
Return the current ROOT perf stats if any. More... | |
static const char * | EventType (EEventType type) |
Return the name of the event type. More... | |
Static Public Member Functions inherited from TObject | |
static Long_t | GetDtorOnly () |
Return destructor only flag. More... | |
static void | SetDtorOnly (void *obj) |
Set destructor only flag. More... | |
static Bool_t | GetObjectStat () |
Get status of object stat flag. More... | |
static void | SetObjectStat (Bool_t stat) |
Turn on/off tracking of objects in the TObjectTable. More... | |
Protected Member Functions inherited from TObject | |
void | MakeZombie () |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
Interface to ErrorHandler (protected). More... | |
#include <TTreePerfStats.h>
TTreePerfStats::TTreePerfStats | ( | ) |
TTreePerfStats::TTreePerfStats | ( | const char * | name, |
TTree * | T | ||
) |
Create a TTree I/O perf stats object.
Definition at line 133 of file TTreePerfStats.cxx.
|
virtual |
Destructor.
Definition at line 181 of file TTreePerfStats.cxx.
Return distance to one of the objects in the TTreePerfStats.
Reimplemented from TObject.
Definition at line 210 of file TTreePerfStats.cxx.
Draw the TTree I/O perf graph.
by default the graph is drawn with option "al" Specify option ="ap" to show only the read blocks and not the line connecting the blocks
Reimplemented from TObject.
Definition at line 243 of file TTreePerfStats.cxx.
Referenced by Browse().
Return distance to one of the objects in the TTreePerfStats.
Reimplemented from TObject.
Definition at line 270 of file TTreePerfStats.cxx.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 98 of file TTreePerfStats.h.
Implements TVirtualPerfStats.
Definition at line 99 of file TTreePerfStats.h.
Record TTree file read event.
Implements TVirtualPerfStats.
Definition at line 279 of file TTreePerfStats.cxx.
|
virtual |
When the run is finished this function must be called to save the current parameters in the file and Tree in this object the function is automatically called by Draw and Print.
Definition at line 319 of file TTreePerfStats.cxx.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 75 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 76 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 77 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 78 of file TTreePerfStats.h.
|
inline |
Definition at line 79 of file TTreePerfStats.h.
|
inline |
Definition at line 80 of file TTreePerfStats.h.
|
inline |
Definition at line 81 of file TTreePerfStats.h.
Referenced by SavePrimitive().
|
inlinevirtual |
Returns name of object.
This default method returns the class name. Classes that give objects a name should override this method.
Reimplemented from TObject.
Definition at line 82 of file TTreePerfStats.h.
Referenced by SavePrimitive().
|
inlinevirtual |
Definition at line 83 of file TTreePerfStats.h.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 84 of file TTreePerfStats.h.
|
inline |
Definition at line 85 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 86 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 87 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 88 of file TTreePerfStats.h.
|
inline |
Definition at line 89 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 90 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 91 of file TTreePerfStats.h.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 96 of file TTreePerfStats.h.
Draw the TTree I/O perf graph.
Reimplemented from TObject.
Definition at line 345 of file TTreePerfStats.cxx.
Print the TTree I/O perf stats.
Reimplemented from TObject.
Definition at line 427 of file TTreePerfStats.cxx.
Implements TVirtualPerfStats.
Definition at line 102 of file TTreePerfStats.h.
Save this object to filename.
Reimplemented from TObject.
Definition at line 465 of file TTreePerfStats.cxx.
Save primitive as a C++ statement(s) on output stream out.
Reimplemented from TObject.
Definition at line 475 of file TTreePerfStats.cxx.
Implements TVirtualPerfStats.
Definition at line 106 of file TTreePerfStats.h.
Definition at line 107 of file TTreePerfStats.h.
Definition at line 108 of file TTreePerfStats.h.
Definition at line 111 of file TTreePerfStats.h.
Definition at line 109 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 112 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 113 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 114 of file TTreePerfStats.h.
|
inlinevirtual |
Definition at line 115 of file TTreePerfStats.h.
Definition at line 116 of file TTreePerfStats.h.
Implements TVirtualPerfStats.
Definition at line 110 of file TTreePerfStats.h.
Definition at line 117 of file TTreePerfStats.h.
Definition at line 118 of file TTreePerfStats.h.
Definition at line 119 of file TTreePerfStats.h.
Definition at line 120 of file TTreePerfStats.h.
Definition at line 121 of file TTreePerfStats.h.
Definition at line 122 of file TTreePerfStats.h.
|
inlinevirtual |
Implements TVirtualPerfStats.
Definition at line 95 of file TTreePerfStats.h.
|
virtual |
Record TTree unzip event.
Implements TVirtualPerfStats.
Definition at line 305 of file TTreePerfStats.cxx.
|
protected |
Definition at line 47 of file TTreePerfStats.h.
Referenced by FileReadEvent(), GetBytesRead(), Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 48 of file TTreePerfStats.h.
Referenced by Finish(), GetBytesReadExtra(), Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 54 of file TTreePerfStats.h.
Referenced by Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 51 of file TTreePerfStats.h.
Referenced by Finish(), GetCpuTime(), Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 52 of file TTreePerfStats.h.
Referenced by FileReadEvent(), GetDiskTime(), Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 57 of file TTreePerfStats.h.
Referenced by FileReadEvent(), Finish(), TTreePerfStats(), and ~TTreePerfStats().
|
protected |
pointer to the Tree being monitored
Definition at line 59 of file TTreePerfStats.h.
Referenced by DistancetoPrimitive(), FileReadEvent(), Finish(), GetGraphIO(), Paint(), SavePrimitive(), TTreePerfStats(), and ~TTreePerfStats().
|
protected |
Definition at line 60 of file TTreePerfStats.h.
Referenced by DistancetoPrimitive(), FileReadEvent(), Finish(), GetGraphTime(), Paint(), SavePrimitive(), TTreePerfStats(), and ~TTreePerfStats().
|
protected |
Definition at line 56 of file TTreePerfStats.h.
Referenced by Paint(), and TTreePerfStats().
|
protected |
Definition at line 64 of file TTreePerfStats.h.
Referenced by DistancetoPrimitive(), Paint(), TTreePerfStats(), and ~TTreePerfStats().
|
protected |
Definition at line 55 of file TTreePerfStats.h.
Referenced by TTreePerfStats().
|
protected |
Definition at line 44 of file TTreePerfStats.h.
Referenced by GetNleaves(), Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 61 of file TTreePerfStats.h.
Referenced by DistancetoPrimitive(), GetPave(), Paint(), TTreePerfStats(), and ~TTreePerfStats().
|
protected |
Definition at line 46 of file TTreePerfStats.h.
Referenced by Finish(), GetReadaheadSize(), Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 45 of file TTreePerfStats.h.
Referenced by FileReadEvent(), GetReadCalls(), Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 49 of file TTreePerfStats.h.
Referenced by Finish(), Paint(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 50 of file TTreePerfStats.h.
Referenced by Finish(), GetRealTime(), Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 63 of file TTreePerfStats.h.
Referenced by DistancetoPrimitive(), Paint(), TTreePerfStats(), and ~TTreePerfStats().
|
protected |
pointer to the file containing the Tree
Definition at line 58 of file TTreePerfStats.h.
Referenced by FileReadEvent(), Finish(), TTreePerfStats(), UnzipEvent(), and ~TTreePerfStats().
|
protected |
Definition at line 43 of file TTreePerfStats.h.
Referenced by Finish(), GetTreeCacheSize(), Paint(), Print(), SavePrimitive(), and TTreePerfStats().
|
protected |
Definition at line 53 of file TTreePerfStats.h.
Referenced by GetUnzipTime(), Paint(), Print(), SavePrimitive(), TTreePerfStats(), and UnzipEvent().
|
protected |
Definition at line 62 of file TTreePerfStats.h.
Referenced by Finish(), GetStopwatch(), TTreePerfStats(), and ~TTreePerfStats().