summaryrefslogtreecommitdiff
path: root/doc/librpm/html/rpmsw_8h_source.html
blob: 0b95b434d2bbad17152b3c3108d96f79a1db2c4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>rpm: rpmsw.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">rpm&#160;<span id="projectnumber">4.9.1</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">rpmsw.h</div>  </div>
</div>
<div class="contents">
<a href="rpmsw_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef H_RPMSW</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define H_RPMSW</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;unistd.h&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;sys/time.h&gt;</span>
<a name="l00010"></a>00010 
<a name="l00011"></a>00011 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00013"></a>00013 <span class="preprocessor">#endif</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span>
<a name="l00017"></a><a class="code" href="group__rpmsw.html#ga17f1fdbc48f3de7d0498dc8a14d8fad3">00017</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="group__rpmsw.html#ga17f1fdbc48f3de7d0498dc8a14d8fad3">rpmtime_t</a>;
<a name="l00018"></a>00018 
<a name="l00021"></a><a class="code" href="group__rpmsw.html#gad7c276bda649c14108c422c82bfd3433">00021</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structrpmsw__s.html">rpmsw_s</a> * <a class="code" href="group__rpmsw.html#gad7c276bda649c14108c422c82bfd3433">rpmsw</a>;
<a name="l00022"></a>00022 
<a name="l00025"></a><a class="code" href="group__rpmsw.html#ga94f0970d0256edb3a66fbf260bbfec6f">00025</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structrpmop__s.html" title="Cumulative statistics for an operation.">rpmop_s</a> * <a class="code" href="group__rpmsw.html#ga94f0970d0256edb3a66fbf260bbfec6f">rpmop</a>;
<a name="l00026"></a>00026 
<a name="l00029"></a><a class="code" href="structrpmsw__s.html">00029</a> <span class="keyword">struct </span><a class="code" href="structrpmsw__s.html">rpmsw_s</a> {
<a name="l00030"></a>00030     <span class="keyword">union </span>{
<a name="l00031"></a><a class="code" href="structrpmsw__s.html#ab70a7306587af628019b6fd350569cce">00031</a>         <span class="keyword">struct </span>timeval <a class="code" href="structrpmsw__s.html#ab70a7306587af628019b6fd350569cce">tv</a>;
<a name="l00032"></a><a class="code" href="structrpmsw__s.html#aec3943bb0cc8c4c20044560a97f88fa2">00032</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="structrpmsw__s.html#aec3943bb0cc8c4c20044560a97f88fa2">ticks</a>;
<a name="l00033"></a><a class="code" href="structrpmsw__s.html#ad5a91626d96f47a6b23c581f363ef7ae">00033</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="structrpmsw__s.html#ad5a91626d96f47a6b23c581f363ef7ae">tocks</a>[2];
<a name="l00034"></a>00034     } <a class="code" href="structrpmsw__s.html#aa37adfab18fd391b74ee67a5f830b161">u</a>;
<a name="l00035"></a>00035 };
<a name="l00036"></a>00036 
<a name="l00040"></a><a class="code" href="structrpmop__s.html">00040</a> <span class="keyword">struct </span><a class="code" href="structrpmop__s.html" title="Cumulative statistics for an operation.">rpmop_s</a> {
<a name="l00041"></a><a class="code" href="structrpmop__s.html#aed842a4c7392f24084306394c51250fb">00041</a>     <span class="keyword">struct </span><a class="code" href="structrpmsw__s.html">rpmsw_s</a>      <a class="code" href="structrpmop__s.html#aed842a4c7392f24084306394c51250fb">begin</a>;  
<a name="l00042"></a><a class="code" href="structrpmop__s.html#a9634b69532968bc33f29d42025fce0ea">00042</a>     <span class="keywordtype">int</span>                 <a class="code" href="structrpmop__s.html#a9634b69532968bc33f29d42025fce0ea">count</a>;  
<a name="l00043"></a><a class="code" href="structrpmop__s.html#ad21e27b2079571a893e786e44e60f24e">00043</a>     <span class="keywordtype">size_t</span>              <a class="code" href="structrpmop__s.html#ad21e27b2079571a893e786e44e60f24e">bytes</a>;  
<a name="l00044"></a><a class="code" href="structrpmop__s.html#a441e7e2e6184a6e052c3955065326214">00044</a>     rpmtime_t           <a class="code" href="structrpmop__s.html#a441e7e2e6184a6e052c3955065326214">usecs</a>;  
<a name="l00045"></a>00045 };
<a name="l00046"></a>00046 
<a name="l00052"></a>00052 rpmsw <a class="code" href="group__rpmsw.html#gad3978708dadb86ed1e480cfa37bedfbc" title="Return benchmark time stamp.">rpmswNow</a>(rpmsw sw);
<a name="l00053"></a>00053 
<a name="l00060"></a>00060 rpmtime_t <a class="code" href="group__rpmsw.html#ga640c70b2a8e24884797ed574f06cd11e" title="Return benchmark time stamp difference.">rpmswDiff</a>(rpmsw end, rpmsw begin);
<a name="l00061"></a>00061 
<a name="l00066"></a>00066 rpmtime_t <a class="code" href="group__rpmsw.html#ga7736ea08d529c45512d8cd17c802baa1" title="Return benchmark time stamp overhead.">rpmswInit</a>(<span class="keywordtype">void</span>);
<a name="l00067"></a>00067 
<a name="l00074"></a>00074 <span class="keywordtype">int</span> <a class="code" href="group__rpmsw.html#ga7f69caae88f9572093fc8b0adf8ecf65" title="Enter timed operation.">rpmswEnter</a>(rpmop op, ssize_t rc);
<a name="l00075"></a>00075 
<a name="l00082"></a>00082 rpmtime_t <a class="code" href="group__rpmsw.html#ga59c7d4152875cee4e893b5a27ce6b02a" title="Exit timed operation.">rpmswExit</a>(rpmop op, ssize_t rc);
<a name="l00083"></a>00083 
<a name="l00090"></a>00090 rpmtime_t <a class="code" href="group__rpmsw.html#ga46822386355eebdf0030ed862eae9b35" title="Sum statistic counters.">rpmswAdd</a>(rpmop to, rpmop from);
<a name="l00091"></a>00091 
<a name="l00098"></a>00098 rpmtime_t <a class="code" href="group__rpmsw.html#ga85fb8eaf390eb601c4c3127265639670" title="Subtract statistic counters.">rpmswSub</a>(rpmop to, rpmop from);
<a name="l00099"></a>00099 
<a name="l00100"></a>00100 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00101"></a>00101 <span class="preprocessor"></span>}
<a name="l00102"></a>00102 <span class="preprocessor">#endif</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span>
<a name="l00104"></a>00104 <span class="preprocessor">#endif  </span><span class="comment">/* H_RPMSW */</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Jul 15 2011 for rpm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>