rpm  4.18.0
Data Structures | Typedefs | Functions
Statistics API.

Statistics API. More...

Collaboration diagram for Statistics API.:

Data Structures

struct  rpmsw_s
 
struct  rpmop_s
 Cumulative statistics for an operation. More...
 

Typedefs

typedef unsigned long int rpmtime_t
 
typedef struct rpmsw_srpmsw
 
typedef struct rpmop_srpmop
 

Functions

rpmsw rpmswNow (rpmsw sw)
 Return benchmark time stamp. More...
 
rpmtime_t rpmswDiff (rpmsw end, rpmsw begin)
 Return benchmark time stamp difference. More...
 
rpmtime_t rpmswInit (void)
 Return benchmark time stamp overhead. More...
 
int rpmswEnter (rpmop op, ssize_t rc)
 Enter timed operation. More...
 
rpmtime_t rpmswExit (rpmop op, ssize_t rc)
 Exit timed operation. More...
 
rpmtime_t rpmswAdd (rpmop to, rpmop from)
 Sum statistic counters. More...
 
rpmtime_t rpmswSub (rpmop to, rpmop from)
 Subtract statistic counters. More...
 

Detailed Description

Statistics API.

Typedef Documentation

◆ rpmop

typedef struct rpmop_s* rpmop

Definition at line 27 of file rpmsw.h.

◆ rpmsw

typedef struct rpmsw_s* rpmsw

Definition at line 23 of file rpmsw.h.

◆ rpmtime_t

typedef unsigned long int rpmtime_t

Definition at line 19 of file rpmsw.h.

Function Documentation

◆ rpmswAdd()

rpmtime_t rpmswAdd ( rpmop  to,
rpmop  from 
)

Sum statistic counters.

Parameters
toresult statistics
fromoperation statistics
Returns
cumulative usecs for operation

◆ rpmswDiff()

rpmtime_t rpmswDiff ( rpmsw  end,
rpmsw  begin 
)

Return benchmark time stamp difference.

Parameters
*endend time stamp
*beginbegin time stamp
Returns
difference in micro-seconds

◆ rpmswEnter()

int rpmswEnter ( rpmop  op,
ssize_t  rc 
)

Enter timed operation.

Parameters
opoperation statistics
rc-1 clears usec counter
Returns
0 always

◆ rpmswExit()

rpmtime_t rpmswExit ( rpmop  op,
ssize_t  rc 
)

Exit timed operation.

Parameters
opoperation statistics
rcper-operation data (e.g. bytes transferred)
Returns
cumulative usecs for operation

◆ rpmswInit()

rpmtime_t rpmswInit ( void  )

Return benchmark time stamp overhead.

Returns
overhead in micro-seconds

◆ rpmswNow()

rpmsw rpmswNow ( rpmsw  sw)

Return benchmark time stamp.

Parameters
*swtime stamp
Returns
0 on success

◆ rpmswSub()

rpmtime_t rpmswSub ( rpmop  to,
rpmop  from 
)

Subtract statistic counters.

Parameters
toresult statistics
fromoperation statistics
Returns
cumulative usecs for operation