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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
|
<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>prometheus-client-c: prom/include/prom_metric_sample.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">prometheus-client-c
 <span id="projectnumber">0.1.1</span>
</div>
<div id="projectbrief">Prometheus client for the C programming language</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_2c63f04010e7ff462eba5e344f58cd21.html">prom</a></li><li class="navelem"><a class="el" href="dir_83821d63a26a6eb889c4977bd95ca990.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">prom_metric_sample.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Functions for interfacting with metric samples directly.
<a href="#details">More...</a></p>
<div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="prom__metric__sample_8h__dep__incl.png" border="0" usemap="#prom_2include_2prom__metric__sample_8hdep" alt=""/></div>
<map name="prom_2include_2prom__metric__sample_8hdep" id="prom_2include_2prom__metric__sample_8hdep">
<area shape="rect" id="node2" href="prom__metric_8h.html" title="Functions for retrieving metric samples from metrics given an ordered set of labels. " alt="" coords="407,95,613,121"/>
<area shape="rect" id="node4" href="prom_8h.html" title="Include prom.h to include the entire public API. " alt="" coords="547,333,705,360"/>
<area shape="rect" id="node3" href="prom__collector_8h.html" title="A Prometheus collector returns a collection of metrics. " alt="" coords="147,169,366,196"/>
<area shape="rect" id="node5" href="prom__collector__registry_8h.html" title="The collector registry registers collectors for metric exposition. " alt="" coords="6,244,214,285"/>
<area shape="rect" id="node7" href="prom__counter_8h.html" title="https://prometheus.io/docs/concepts/metric_types/#counter " alt="" coords="288,251,500,278"/>
<area shape="rect" id="node8" href="prom__gauge_8h.html" title="https://prometheus.io/docs/concepts/metric_types/#gauge " alt="" coords="524,251,728,278"/>
<area shape="rect" id="node9" href="prom__histogram_8h.html" title="https://prometheus.io/docs/concepts/metric_types/#histogram " alt="" coords="548,169,779,196"/>
<area shape="rect" id="node6" href="promhttp_8h.html" title="Provides a HTTP endpoint for metric exposition References: " alt="" coords="5,333,215,360"/>
</map>
</div>
</div>
<p><a href="prom__metric__sample_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a0fb9ff851bf9ee126756ae826a2ce72a"><td class="memItemLeft" align="right" valign="top"><a id="a0fb9ff851bf9ee126756ae826a2ce72a"></a>
typedef struct prom_metric_sample </td><td class="memItemRight" valign="bottom"><a class="el" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a></td></tr>
<tr class="memdesc:a0fb9ff851bf9ee126756ae826a2ce72a"><td class="mdescLeft"> </td><td class="mdescRight">Contains the specific metric and value given the name and label set Reference: <a href="https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels">https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels</a>. <br /></td></tr>
<tr class="separator:a0fb9ff851bf9ee126756ae826a2ce72a"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3f8674d6c8ee2c27eb7504d602110daa"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="prom__metric__sample_8h.html#a3f8674d6c8ee2c27eb7504d602110daa">prom_metric_sample_add</a> (<a class="el" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> *self, double r_value)</td></tr>
<tr class="memdesc:a3f8674d6c8ee2c27eb7504d602110daa"><td class="mdescLeft"> </td><td class="mdescRight">Add the r_value to the sample. <a href="#a3f8674d6c8ee2c27eb7504d602110daa">More...</a><br /></td></tr>
<tr class="separator:a3f8674d6c8ee2c27eb7504d602110daa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1965caa1626c308bc1cb23995e90a0a7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="prom__metric__sample_8h.html#a1965caa1626c308bc1cb23995e90a0a7">prom_metric_sample_sub</a> (<a class="el" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> *self, double r_value)</td></tr>
<tr class="memdesc:a1965caa1626c308bc1cb23995e90a0a7"><td class="mdescLeft"> </td><td class="mdescRight">Subtract the r_value from the sample. <a href="#a1965caa1626c308bc1cb23995e90a0a7">More...</a><br /></td></tr>
<tr class="separator:a1965caa1626c308bc1cb23995e90a0a7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0c5f0c66599282c2ee2c042ae4574db3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="prom__metric__sample_8h.html#a0c5f0c66599282c2ee2c042ae4574db3">prom_metric_sample_set</a> (<a class="el" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> *self, double r_value)</td></tr>
<tr class="memdesc:a0c5f0c66599282c2ee2c042ae4574db3"><td class="mdescLeft"> </td><td class="mdescRight">Set the r_value of the sample. <a href="#a0c5f0c66599282c2ee2c042ae4574db3">More...</a><br /></td></tr>
<tr class="separator:a0c5f0c66599282c2ee2c042ae4574db3"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Functions for interfacting with metric samples directly. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a3f8674d6c8ee2c27eb7504d602110daa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f8674d6c8ee2c27eb7504d602110daa">◆ </a></span>prom_metric_sample_add()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int prom_metric_sample_add </td>
<td>(</td>
<td class="paramtype"><a class="el" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>r_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Add the r_value to the sample. </p>
<p>The value must be greater than or equal to zero. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The target prom_metric_sample_t* </td></tr>
<tr><td class="paramname">r_value</td><td>The double to add to prom_metric_sample_t* provided by self </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Non-zero integer value upon failure </dd></dl>
</div>
</div>
<a id="a0c5f0c66599282c2ee2c042ae4574db3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c5f0c66599282c2ee2c042ae4574db3">◆ </a></span>prom_metric_sample_set()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int prom_metric_sample_set </td>
<td>(</td>
<td class="paramtype"><a class="el" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>r_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the r_value of the sample. </p>
<p>This operation MUST be called on a sample derived from a gauge metric. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The target prom_metric_sample_t* </td></tr>
<tr><td class="paramname">r_value</td><td>The double which will be set to the prom_metric_sample_t* provided by self </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Non-zero integer value upon failure </dd></dl>
</div>
</div>
<a id="a1965caa1626c308bc1cb23995e90a0a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1965caa1626c308bc1cb23995e90a0a7">◆ </a></span>prom_metric_sample_sub()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int prom_metric_sample_sub </td>
<td>(</td>
<td class="paramtype"><a class="el" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> * </td>
<td class="paramname"><em>self</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>r_value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Subtract the r_value from the sample. </p>
<p>This operation MUST be called a sample derived from a gauge metric. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">self</td><td>The target prom_metric_sample_t* </td></tr>
<tr><td class="paramname">r_value</td><td>The double to subtract from the prom_metric_sample_t* provided by self </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Non-zero integer value upon failure </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
|