File: stats.h

package info (click to toggle)
ace 8.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 47,064 kB
  • sloc: cpp: 342,819; perl: 31,902; sh: 1,963; python: 532; yacc: 524; xml: 330; lex: 158; lisp: 116; makefile: 85; csh: 20; ansic: 19; tcl: 5
file content (29 lines) | stat: -rw-r--r-- 520 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "global.h"

#ifndef _D_Stats
#define _D_Stats

#define THREAD_START 42
#define THREAD_END 43

class Init_Fini_t {
public:
  int type; // 0 is start, 1 is end
  ACE_Time_Value timestamp;
};

class Stats {
public:
  Stats(int);
  void log(int, float, float);
  void i_have_started(int);
  void i_am_done(int);
  void print (char *);
  void output();
private:
  float *throughput_;
  float *latency_;
  Init_Fini_t *init_fini_; // Array (2n deep) to count peak no. of active threads
  int thread_count_;
};
#endif