rpmio/rpmsw.c File Reference

#include "system.h"
#include <rpmsw.h>
#include "debug.h"

Go to the source code of this file.

Functions

rpmsw rpmswNow (rpmsw sw)
 Return benchmark time stamp.
static rpmtime_t tvsub (const struct timeval *etv, const struct timeval *btv)
 Return difference of 2 timeval stamps in micro-seconds.
rpmtime_t rpmswDiff (rpmsw end, rpmsw begin)
 Return benchmark time stamp difference.
rpmtime_t rpmswInit (void)
 Return benchmark time stamp overhead.
int rpmswEnter (rpmop op, ssize_t rc)
 Enter timed operation.
rpmtime_t rpmswExit (rpmop op, ssize_t rc)
 Exit timed operation.
rpmtime_t rpmswAdd (rpmop to, rpmop from)
 Sum statistic counters.
rpmtime_t rpmswSub (rpmop to, rpmop from)
 Subtract statistic counters.

Variables

static rpmtime_t rpmsw_overhead = 0
static rpmtime_t rpmsw_cycles = 1
static int rpmsw_type = 0
static int rpmsw_initialized = 0


Detailed Description

Definition in file rpmsw.c.


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 112 of file rpmsw.c.

Referenced by rpmswAdd().

rpmtime_t rpmswInit ( void   ) 

Return benchmark time stamp overhead.

Returns:
overhead in micro-seconds

Definition at line 165 of file rpmsw.c.

Referenced by rpmswNow().

rpmsw rpmswNow ( rpmsw  sw  ) 

Return benchmark time stamp.

Parameters:
*sw time stamp
Returns:
0 on success

Definition at line 73 of file rpmsw.c.

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

Referenced by rpmswAdd(), and rpmswExit().


Variable Documentation

rpmtime_t rpmsw_cycles = 1 [static]

Definition at line 20 of file rpmsw.c.

int rpmsw_initialized = 0 [static]

Definition at line 26 of file rpmsw.c.

Referenced by rpmswNow().

rpmtime_t rpmsw_overhead = 0 [static]

Definition at line 17 of file rpmsw.c.

int rpmsw_type = 0 [static]

Definition at line 23 of file rpmsw.c.

Referenced by rpmswNow().


Generated on Sun Jun 1 21:56:24 2008 for rpm by  doxygen 1.5.4