summaryrefslogtreecommitdiff
path: root/docs/prom__metric__sample_8h_source.html
blob: aea6487e3bb08f7050c0b40e941ee216df779607 (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
<!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 Source File</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
   &#160;<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="headertitle">
<div class="title">prom_metric_sample.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="prom__metric__sample_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">Copyright 2019 DigitalOcean Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">You may obtain a copy of the License at</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">     http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">limitations under the License.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifndef PROM_METRIC_SAMPLE_H</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define PROM_METRIC_SAMPLE_H</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">struct </span>prom_metric_sample;</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">   30</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>prom_metric_sample <a class="code" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a>;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keywordtype">int</span> <a class="code" href="prom__metric__sample_8h.html#a3f8674d6c8ee2c27eb7504d602110daa">prom_metric_sample_add</a>(<a class="code" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> *<span class="keyword">self</span>, <span class="keywordtype">double</span> r_value);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keywordtype">int</span> <a class="code" href="prom__metric__sample_8h.html#a1965caa1626c308bc1cb23995e90a0a7">prom_metric_sample_sub</a>(<a class="code" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> *<span class="keyword">self</span>, <span class="keywordtype">double</span> r_value);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="keywordtype">int</span> <a class="code" href="prom__metric__sample_8h.html#a0c5f0c66599282c2ee2c042ae4574db3">prom_metric_sample_set</a>(<a class="code" href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a> *<span class="keyword">self</span>, <span class="keywordtype">double</span> r_value);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#endif  // PROM_METRIC_SAMPLE_H</span></div><div class="ttc" id="prom__metric__sample_8h_html_a0fb9ff851bf9ee126756ae826a2ce72a"><div class="ttname"><a href="prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a">prom_metric_sample_t</a></div><div class="ttdeci">struct prom_metric_sample prom_metric_sample_t</div><div class="ttdoc">Contains the specific metric and value given the name and label set Reference: https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels. </div><div class="ttdef"><b>Definition:</b> prom_metric_sample.h:30</div></div>
<div class="ttc" id="prom__metric__sample_8h_html_a3f8674d6c8ee2c27eb7504d602110daa"><div class="ttname"><a href="prom__metric__sample_8h.html#a3f8674d6c8ee2c27eb7504d602110daa">prom_metric_sample_add</a></div><div class="ttdeci">int prom_metric_sample_add(prom_metric_sample_t *self, double r_value)</div><div class="ttdoc">Add the r_value to the sample. </div></div>
<div class="ttc" id="prom__metric__sample_8h_html_a1965caa1626c308bc1cb23995e90a0a7"><div class="ttname"><a href="prom__metric__sample_8h.html#a1965caa1626c308bc1cb23995e90a0a7">prom_metric_sample_sub</a></div><div class="ttdeci">int prom_metric_sample_sub(prom_metric_sample_t *self, double r_value)</div><div class="ttdoc">Subtract the r_value from the sample. </div></div>
<div class="ttc" id="prom__metric__sample_8h_html_a0c5f0c66599282c2ee2c042ae4574db3"><div class="ttname"><a href="prom__metric__sample_8h.html#a0c5f0c66599282c2ee2c042ae4574db3">prom_metric_sample_set</a></div><div class="ttdeci">int prom_metric_sample_set(prom_metric_sample_t *self, double r_value)</div><div class="ttdoc">Set the r_value of the sample. </div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>