Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

rpmio/rpmsw.c File Reference

More...

#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.

rpmtime_t tvsub (const struct timeval *etv, const struct timeval *btv)
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)
rpmtime_t rpmswExit (rpmop op, ssize_t rc)
rpmtime_t rpmswAdd (rpmop to, rpmop from)
rpmtime_t rpmswSub (rpmop to, rpmop from)

Variables

rpmtime_t rpmsw_overhead = 0
rpmtime_t rpmsw_cycles = 1
int rpmsw_type = 0
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 119 of file rpmsw.c.

References rpmsw, rpmsw_cycles, rpmsw_overhead, rpmsw_type, rpmtime_t, 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 176 of file rpmsw.c.

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

Referenced by rpmswNow().

rpmsw rpmswNow rpmsw  sw  ) 
 

Return benchmark time stamp.

Parameters:
*sw time stamp
Returns:
0 on success

Definition at line 80 of file rpmsw.c.

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

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


Variable Documentation

rpmtime_t rpmsw_cycles = 1 [static]
 

Definition at line 22 of file rpmsw.c.

Referenced by rpmswDiff(), and rpmswInit().

int rpmsw_initialized = 0 [static]
 

Definition at line 28 of file rpmsw.c.

Referenced by rpmswInit(), and rpmswNow().

rpmtime_t rpmsw_overhead = 0 [static]
 

Definition at line 19 of file rpmsw.c.

Referenced by rpmswDiff(), and rpmswInit().

int rpmsw_type = 0 [static]
 

Definition at line 25 of file rpmsw.c.

Referenced by rpmswDiff(), rpmswInit(), and rpmswNow().


Generated on Tue Dec 28 15:13:27 2004 for rpm by doxygen 1.3.6