/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DbiTimer.h
Go to the documentation of this file.
00001 // $Id: DbiTimer.h,v 1.3 2003/02/27 16:16:29 west Exp $
00002 
00003 #ifndef DBITIMER
00004 #define DBITIMER
00005 
00007 // DbiTimer                                                           //
00008 //                                                                    //
00009 // Package: Dbi (Database Interface).                                 //
00010 //                                                                    //
00011 // N. West 01/2002                                                    //
00012 //                                                                    //
00013 // Concept: Simple timer record query progress and final times.       //
00014 //                                                                    //
00015 // Purpose: To find out why this is all soooo sssllloooowwww!         //
00016 //                                                                    //
00018 
00019 #include <string>
00020 
00021 #include "TStopwatch.h"
00022 #include "DatabaseInterface/DbiFieldType.h"
00023 
00024 class DbiTableMetaData;
00025 
00026 class DbiTimer
00027 {
00028 
00029 public:
00030 
00031 // Constructors and destructors.
00032            DbiTimer();
00033   virtual ~DbiTimer();
00034 
00035 // State testing member functions
00036 
00037 // State changing member functions
00038     void RecBegin(string tableName, UInt_t rowSize);
00039     void RecEnd(UInt_t numRows);
00040     void RecFillAgg(Int_t aggNo);
00041     void RecMainQuery();
00042     void Resume();
00043     void StartSubWatch(UInt_t subWatch);
00044     void Suspend();
00045 
00046 // Global timer used for all queries to the DBI.
00047 
00048 private:  
00049 
00050  enum  QueryStage { kPassive, kInitialQuery, kMainQuery };
00051  enum { kMaxSubWatch = 4 };  // Must be > 0.
00052 
00053 // Data members
00054 
00055        Int_t fCurSubWatch; // Current SubWatch or -1 if disabled.
00056       UInt_t fRowSize;     // Size of row object
00057   QueryStage fQueryStage;  // Query stage
00058   TStopwatch fSubWatches[kMaxSubWatch]; // Partial timers
00059       string fTableName;   // Current table
00060   TStopwatch fWatch;       // Timer
00061 
00062  // Removed: ClassDef(DbiTimer,0)     // Simple query timer
00063 
00064 };
00065 
00066 
00067 #endif // DBITIMER
00068 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:56:45 for DatabaseInterface by doxygen 1.7.4