repo.or.cz
/
csql.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
*** empty log message ***
[csql.git]
/
test
/
performance
/
wisc
/
wiscTimer.h
blob
243afb6f08ea3e52ad833ab6f58daeb13ee4806e
1
2
#ifndef _WISCTIMER_H_
3
#define _WISCTIMER_H_
4
5
6
#include <sys/times.h>
7
#include <sys/time.h>
8
9
enum
wiscTimeType
{
wiscWallTime
,
wiscResTime
,
wiscUserTime
,
wiscSysTime
};
10
11
class
wiscTimer
{
12
13
private
:
14
double
tickVal
;
15
16
int
count
;
17
double
sumWallX
;
18
double
sumWallX2
;
19
double
sumUserX
;
20
double
sumUserX2
;
21
double
sumKernX
;
22
double
sumKernX2
;
23
double
sumResX
;
24
double
sumResX2
;
25
26
int
in_time
;
27
28
struct
timeval startTval
;
29
struct
tms startTmsval
;
30
31
public
:
32
33
wiscTimer
();
34
int
resetTimer
();
35
int
startTimer
();
36
int
stopTimer
();
37
38
int
numIters
();
39
40
double
avgTime
(
wiscTimeType
);
41
double
stddevTime
(
wiscTimeType
);
42
};
43
44
#endif
/* _WISCTIMER_H_ */
45