rpm: Statistics API.

rpm 4.20.0 The RPM Package Manager

Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
Statistics API.
I/O

Statistics API. More...

Collaboration diagram for Statistics API.:

## Data Structures
struct | rpmsw_s
struct | rpmop_s

## Typedefs
typedef unsigned long int | rpmtime_t
typedef struct rpmsw_s * | rpmsw
typedef struct rpmop_s * | rpmop

## Functions
rpmsw | rpmswNow (rpmsw sw)
rpmtime_t | rpmswDiff (rpmsw end, rpmsw begin)
rpmtime_t | rpmswInit (void)
int | rpmswEnter (rpmop op, ssize_t rc)
rpmtime_t | rpmswExit (rpmop op, ssize_t rc)
rpmtime_t | rpmswAdd (rpmop to, rpmop from)
rpmtime_t | rpmswSub (rpmop to, rpmop from)

## Detailed Description

Statistics API.

## Function Documentation

## ◆ rpmswAdd()

rpmtime_t rpmswAdd | ( | rpmop | to,
|  | rpmop | from )

Sum statistic counters.

Parameters

  to | result statistics
  from | operation statistics

Returns
  cumulative usecs for operation

## ◆ rpmswDiff()

rpmtime_t rpmswDiff | ( | rpmsw | end,
|  | rpmsw | begin )

Return benchmark time stamp difference.

Parameters

  *end | end time stamp
  *begin | begin time stamp

Returns
  difference in micro-seconds

## ◆ rpmswEnter()

int rpmswEnter | ( | rpmop | op,
|  | ssize_t | rc )

Enter timed operation.

Parameters

  op | operation statistics
  rc | -1 clears usec counter

Returns
  0 always

## ◆ rpmswExit()

rpmtime_t rpmswExit | ( | rpmop | op,
|  | ssize_t | rc )

Exit timed operation.

Parameters

  op | operation statistics
  rc | per-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

  *sw | time stamp

Returns
  0 on success

## ◆ rpmswSub()

rpmtime_t rpmswSub | ( | rpmop | to,
|  | rpmop | from )

Subtract statistic counters.

Parameters

  to | result statistics
  from | operation statistics

Returns
  cumulative usecs for operation