Zero  0.1.0
xctlatency.h
Go to the documentation of this file.
1 #ifndef __XCTLATENCY_H
2 #define __XCTLATENCY_H
3 
4 #include "command.h"
5 #include "handler.h"
6 
7 class XctLatency : public LogScannerCommand {
8 public:
9  void run();
10 
11  void setupOptions();
12 
13 private:
14  string beginType;
15 
16  string endType;
17 
18  int interval;
19 };
20 
21 class LatencyHandler : public Handler {
22 public:
23  LatencyHandler(int interval = 1,
26 
27  virtual void invoke(logrec_t& r);
28 
29  virtual void finalize();
30 
31 protected:
32  const int interval;
33 
35 
37 
39 
40  bool seenBegin;
41 
42  unsigned long accum_latency;
43 
44  unsigned count;
45 
46  void dump();
47 };
48 
49 #endif // __XCTLATENCY_H
bool seenBegin
Definition: xctlatency.h:40
string endType
Definition: xctlatency.h:16
Definition: xctlatency.h:7
int currentTick
Definition: xctlatency.h:34
const int interval
Definition: xctlatency.h:32
Represents a transactional log record.
Definition: logrec.h:143
unsigned long accum_latency
Definition: xctlatency.h:42
int interval
Definition: xctlatency.h:18
unsigned count
Definition: xctlatency.h:44
Definition: command.h:70
Definition: handler.h:11
Definition: xctlatency.h:21
logrec_t::kind_t end
Definition: xctlatency.h:38
string beginType
Definition: xctlatency.h:14
void run()
Definition: xctlatency.cpp:16
Definition: logrec.h:201
void setupOptions()
Definition: xctlatency.cpp:3
logrec_t::kind_t begin
Definition: xctlatency.h:36
kind_t
Definition: logrec.h:149