rpm 5.2.1

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

- File List
- Globals

Data Structures | Typedefs | Enumerations | Functions | Variables
rpmsw.h File Reference
RPMIO.
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | rpmsw_s
struct | rpmop_s
| Cumulative statistics for an operation. More...

## Typedefs
typedef unsigned long int | rpmtime_t
typedef struct rpmsw_s * | rpmsw
typedef struct rpmop_s * | rpmop
typedef enum rpmswOpX_e | rpmswOpX
| Indices for timestamps. More...

## Enumerations
enum | rpmswOpX_e { RPMSW_OP_TOTAL = 0, RPMSW_OP_CHECK = 1, RPMSW_OP_ORDER = 2, RPMSW_OP_FINGERPRINT = 3, RPMSW_OP_REPACKAGE = 4, RPMSW_OP_INSTALL = 5, RPMSW_OP_ERASE = 6, RPMSW_OP_SCRIPTLETS = 7, RPMSW_OP_COMPRESS = 8, RPMSW_OP_UNCOMPRESS = 9, RPMSW_OP_DIGEST = 10, RPMSW_OP_SIGNATURE = 11, RPMSW_OP_DBADD = 12, RPMSW_OP_DBREMOVE = 13, RPMSW_OP_DBGET = 14, RPMSW_OP_DBPUT = 15, RPMSW_OP_DBDEL = 16, RPMSW_OP_READHDR = 17, RPMSW_OP_HDRLOAD = 18, RPMSW_OP_HDRGET = 19, RPMSW_OP_DEBUG = 20, RPMSW_OP_MAX = 20 }
| Indices for timestamps. More...

## 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...
void | rpmswPrint (const char *name, rpmop op)
| Print operation statistics. More...

## Variables
int | _rpmsw_stats

## Function Documentation

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

Definition at line 123 of file rpmsw.c.

References rpmsw_cycles, rpmsw_overhead, rpmsw_type, rpmsw_s::ticks, rpmsw_s::tv, tvsub(), and rpmsw_s::u.

Referenced by rpmswExit(), and rpmswInit().

rpmtime_t rpmswInit | ( | void |  | ) |

Return benchmark time stamp overhead.

Returns
  overhead in micro-seconds

Definition at line 180 of file rpmsw.c.

References rpmsw_cycles, rpmsw_initialized, rpmsw_overhead, rpmsw_type, rpmswDiff(), and rpmswNow().

Referenced by rpmswNow().

rpmsw rpmswNow | ( | rpmsw | sw | ) |

Return benchmark time stamp.

Parameters

  *sw | time stamp

Returns
  0 on success

Definition at line 84 of file rpmsw.c.

References rpmsw_initialized, rpmsw_type, rpmswInit(), rpmsw_s::ticks, rpmsw_s::tv, and rpmsw_s::u.

Referenced by rpmswEnter(), rpmswExit(), and rpmswInit().

## Variable Documentation

int _rpmsw_stats

Definition at line 20 of file rpmsw.c.

Referenced by main().