rpm: rpmsw.h Source File

rpm 4.12.0.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

rpmsw.h
Go to the documentation of this file.
1 #ifndef H_RPMSW
2 #define H_RPMSW
3
8 #include <unistd.h>
9 #include <sys/time.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
17 typedef unsigned long int rpmtime_t;
18
21 typedef struct rpmsw_s * rpmsw;
22
25 typedef struct rpmop_s * rpmop;
26
29 struct rpmsw_s {
30 union {
31 struct timeval tv;
32 unsigned long long int ticks;
33 unsigned long int tocks[2];
34 } u;
35 };
36
40 struct rpmop_s {
41 struct rpmsw_s begin;
42 int count;
43 size_t bytes;
44 rpmtime_t usecs;
45 };
46
52 rpmsw rpmswNow(rpmsw sw);
53
60 rpmtime_t rpmswDiff(rpmsw end, rpmsw begin);
61
66 rpmtime_t rpmswInit(void);
67
74 int rpmswEnter(rpmop op, ssize_t rc);
75
82 rpmtime_t rpmswExit(rpmop op, ssize_t rc);
83
90 rpmtime_t rpmswAdd(rpmop to, rpmop from);
91
98 rpmtime_t rpmswSub(rpmop to, rpmop from);
99
100 #ifdef __cplusplus
101 }
102 #endif
103
104 #endif /* H_RPMSW */
rpmop
struct rpmop_s * rpmop
Definition: rpmsw.h:25
rpmop_s::usecs
rpmtime_t usecs
Definition: rpmsw.h:44
rpmswDiff
rpmtime_t rpmswDiff(rpmsw end, rpmsw begin)
Return benchmark time stamp difference.
rpmsw_s::u
union rpmsw_s::@0 u
rpmswExit
rpmtime_t rpmswExit(rpmop op, ssize_t rc)
Exit timed operation.
rpmswAdd
rpmtime_t rpmswAdd(rpmop to, rpmop from)
Sum statistic counters.
rpmswInit
rpmtime_t rpmswInit(void)
Return benchmark time stamp overhead.
rpmsw_s::tv
struct timeval tv
Definition: rpmsw.h:31
rpmop_s::count
int count
Definition: rpmsw.h:42
rpmop_s::begin
struct rpmsw_s begin
Definition: rpmsw.h:41
rpmswEnter
int rpmswEnter(rpmop op, ssize_t rc)
Enter timed operation.
rpmop_s
Cumulative statistics for an operation.
Definition: rpmsw.h:40
rpmop_s::bytes
size_t bytes
Definition: rpmsw.h:43
rpmsw_s
Definition: rpmsw.h:29
rpmsw_s::ticks
unsigned long long int ticks
Definition: rpmsw.h:32
rpmsw
struct rpmsw_s * rpmsw
Definition: rpmsw.h:21
rpmsw_s::tocks
unsigned long int tocks[2]
Definition: rpmsw.h:33
rpmtime_t
unsigned long int rpmtime_t
Definition: rpmsw.h:17
rpmswNow
rpmsw rpmswNow(rpmsw sw)
Return benchmark time stamp.
rpmswSub
rpmtime_t rpmswSub(rpmop to, rpmop from)
Subtract statistic counters.