summaryrefslogtreecommitdiff
path: root/docs/prom__histogram_8h_source.html
blob: ad5025a238e67a3c119e28472f179b53705bb060 (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
<!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_histogram.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_histogram.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="prom__histogram_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_HISTOGRAM_INCLUDED</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define PROM_HISTOGRAM_INCLUDED</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="preprocessor">#include &lt;stdlib.h&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="prom__metric_8h.html">prom_metric.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="prom__histogram__buckets_8h.html">prom_histogram_buckets.h</a>&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="prom__histogram_8h.html#a8c061924368d41c161025bf3d3cde9ae">   36</a></span>&#160;<span class="keyword">typedef</span> <a class="code" href="prom__metric_8h.html#afd1bd014c48955d6c2c36aa8a8cbb889">prom_metric_t</a> <a class="code" href="prom__histogram_8h.html#a8c061924368d41c161025bf3d3cde9ae">prom_histogram_t</a>;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<a class="code" href="prom__histogram_8h.html#a8c061924368d41c161025bf3d3cde9ae">prom_histogram_t</a>* <a class="code" href="prom__histogram_8h.html#ad42681e59e727f9e3d43bf0cdbba9a1b">prom_histogram_new</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name,</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                                     <span class="keyword">const</span> <span class="keywordtype">char</span> *help,</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                                     <a class="code" href="structprom__histogram__buckets.html">prom_histogram_buckets_t</a> *buckets,</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                                     <span class="keywordtype">size_t</span> label_key_count,</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                                     <span class="keyword">const</span> <span class="keywordtype">char</span> **label_keys);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="keywordtype">int</span> <a class="code" href="prom__histogram_8h.html#af9067b27e7ab2abd815af0614bb35357">prom_histogram_destroy</a>(<a class="code" href="prom__histogram_8h.html#a8c061924368d41c161025bf3d3cde9ae">prom_histogram_t</a> *<span class="keyword">self</span>);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keywordtype">int</span> <a class="code" href="prom__histogram_8h.html#a274e4b869c7d9239e9f47b3898210fbe">prom_histogram_observe</a>(<a class="code" href="prom__histogram_8h.html#a8c061924368d41c161025bf3d3cde9ae">prom_histogram_t</a> *<span class="keyword">self</span>, <span class="keywordtype">double</span> value, <span class="keyword">const</span> <span class="keywordtype">char</span> **label_values);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="preprocessor">#endif  // PROM_HISTOGRAM_INCLUDED</span></div><div class="ttc" id="prom__histogram_8h_html_af9067b27e7ab2abd815af0614bb35357"><div class="ttname"><a href="prom__histogram_8h.html#af9067b27e7ab2abd815af0614bb35357">prom_histogram_destroy</a></div><div class="ttdeci">int prom_histogram_destroy(prom_histogram_t *self)</div><div class="ttdoc">Destroy a prom_histogram_t*. </div></div>
<div class="ttc" id="prom__metric_8h_html_afd1bd014c48955d6c2c36aa8a8cbb889"><div class="ttname"><a href="prom__metric_8h.html#afd1bd014c48955d6c2c36aa8a8cbb889">prom_metric_t</a></div><div class="ttdeci">struct prom_metric prom_metric_t</div><div class="ttdoc">A prometheus metric. </div><div class="ttdef"><b>Definition:</b> prom_metric.h:34</div></div>
<div class="ttc" id="structprom__histogram__buckets_html"><div class="ttname"><a href="structprom__histogram__buckets.html">prom_histogram_buckets</a></div><div class="ttdef"><b>Definition:</b> prom_histogram_buckets.h:27</div></div>
<div class="ttc" id="prom__histogram_8h_html_a8c061924368d41c161025bf3d3cde9ae"><div class="ttname"><a href="prom__histogram_8h.html#a8c061924368d41c161025bf3d3cde9ae">prom_histogram_t</a></div><div class="ttdeci">prom_metric_t prom_histogram_t</div><div class="ttdoc">A prometheus histogram. </div><div class="ttdef"><b>Definition:</b> prom_histogram.h:36</div></div>
<div class="ttc" id="prom__histogram_8h_html_ad42681e59e727f9e3d43bf0cdbba9a1b"><div class="ttname"><a href="prom__histogram_8h.html#ad42681e59e727f9e3d43bf0cdbba9a1b">prom_histogram_new</a></div><div class="ttdeci">prom_histogram_t * prom_histogram_new(const char *name, const char *help, prom_histogram_buckets_t *buckets, size_t label_key_count, const char **label_keys)</div><div class="ttdoc">Construct a prom_histogram_t*. </div></div>
<div class="ttc" id="prom__metric_8h_html"><div class="ttname"><a href="prom__metric_8h.html">prom_metric.h</a></div><div class="ttdoc">Functions for retrieving metric samples from metrics given an ordered set of labels. </div></div>
<div class="ttc" id="prom__histogram_8h_html_a274e4b869c7d9239e9f47b3898210fbe"><div class="ttname"><a href="prom__histogram_8h.html#a274e4b869c7d9239e9f47b3898210fbe">prom_histogram_observe</a></div><div class="ttdeci">int prom_histogram_observe(prom_histogram_t *self, double value, const char **label_values)</div><div class="ttdoc">Observe the prom_histogram_t given the value and labells. </div></div>
<div class="ttc" id="prom__histogram__buckets_8h_html"><div class="ttname"><a href="prom__histogram__buckets_8h.html">prom_histogram_buckets.h</a></div><div class="ttdoc">https://prometheus.io/docs/concepts/metric_types/#histogram </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>