| <!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.6"/> |
| <title>Impala: impala::StreamingSampler< T, MAX_SAMPLES > Class Template 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="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(initResizable); |
| $(window).load(resizeHeight); |
| </script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/search.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(function() { searchBox.OnSelectItem(0); }); |
| </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 style="padding-left: 0.5em;"> |
| <div id="projectname">Impala |
| </div> |
| <div id="projectbrief">Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.6 --> |
| <script type="text/javascript"> |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| </script> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.html"><span>Main Page</span></a></li> |
| <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
| <li class="current"><a href="annotated.html"><span>Classes</span></a></li> |
| <li><a href="files.html"><span>Files</span></a></li> |
| <li> |
| <div id="MSearchBox" class="MSearchBoxInactive"> |
| <span class="left"> |
| <img id="MSearchSelect" src="search/mag_sel.png" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| alt=""/> |
| <input type="text" id="MSearchField" value="Search" accesskey="S" |
| onfocus="searchBox.OnSearchFieldFocus(true)" |
| onblur="searchBox.OnSearchFieldFocus(false)" |
| onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| </span><span class="right"> |
| <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| </span> |
| </div> |
| </li> |
| </ul> |
| </div> |
| <div id="navrow2" class="tabs2"> |
| <ul class="tablist"> |
| <li><a href="annotated.html"><span>Class List</span></a></li> |
| <li><a href="classes.html"><span>Class Index</span></a></li> |
| <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> |
| <li><a href="functions.html"><span>Class Members</span></a></li> |
| </ul> |
| </div> |
| </div><!-- top --> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| <div id="nav-sync" class="sync"></div> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| $(document).ready(function(){initNavTree('classimpala_1_1StreamingSampler.html','');}); |
| </script> |
| <div id="doc-content"> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a></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 class="header"> |
| <div class="summary"> |
| <a href="#pub-methods">Public Member Functions</a> | |
| <a href="#pri-attribs">Private Attributes</a> | |
| <a href="classimpala_1_1StreamingSampler-members.html">List of all members</a> </div> |
| <div class="headertitle"> |
| <div class="title">impala::StreamingSampler< T, MAX_SAMPLES > Class Template Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p><code>#include <<a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>></code></p> |
| <div class="dynheader"> |
| Collaboration diagram for impala::StreamingSampler< T, MAX_SAMPLES >:</div> |
| <div class="dyncontent"> |
| <div class="center"><iframe scrolling="no" frameborder="0" src="classimpala_1_1StreamingSampler__coll__graph.svg" width="440" height="563"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div> |
| </div> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| Public Member Functions</h2></td></tr> |
| <tr class="memitem:ab4e4381eb77d54a761ec55fb293b4a16"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#ab4e4381eb77d54a761ec55fb293b4a16">StreamingSampler</a> (int initial_period=500)</td></tr> |
| <tr class="separator:ab4e4381eb77d54a761ec55fb293b4a16"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a5089e43e53f322b12701d36fcd00864a"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#a5089e43e53f322b12701d36fcd00864a">StreamingSampler</a> (int period, const std::vector< T > &initial_samples)</td></tr> |
| <tr class="memdesc:a5089e43e53f322b12701d36fcd00864a"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the sampler with values. <a href="#a5089e43e53f322b12701d36fcd00864a">More...</a><br/></td></tr> |
| <tr class="separator:a5089e43e53f322b12701d36fcd00864a"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a853a60d2c09941f91994f3f055a07975"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#a853a60d2c09941f91994f3f055a07975">AddSample</a> (T sample, int ms)</td></tr> |
| <tr class="separator:a853a60d2c09941f91994f3f055a07975"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a13ef3347e6f4772e50e52aa7bcbfd98a"><td class="memItemLeft" align="right" valign="top">const T * </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#a13ef3347e6f4772e50e52aa7bcbfd98a">GetSamples</a> (int *num_samples, int *period, <a class="el" href="classimpala_1_1SpinLock.html">SpinLock</a> **lock=NULL) const </td></tr> |
| <tr class="separator:a13ef3347e6f4772e50e52aa7bcbfd98a"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:adb5d140b0d455c14673006bbc1954184"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#adb5d140b0d455c14673006bbc1954184">SetSamples</a> (int period, const std::vector< T > &samples)</td></tr> |
| <tr class="memdesc:adb5d140b0d455c14673006bbc1954184"><td class="mdescLeft"> </td><td class="mdescRight">Set the underlying data to period/samples. <a href="#adb5d140b0d455c14673006bbc1954184">More...</a><br/></td></tr> |
| <tr class="separator:adb5d140b0d455c14673006bbc1954184"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a4cb101f4fec78bff4ab4498b4a2a1c89"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#a4cb101f4fec78bff4ab4498b4a2a1c89">DebugString</a> (const std::string &prefix="") const </td></tr> |
| <tr class="separator:a4cb101f4fec78bff4ab4498b4a2a1c89"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a> |
| Private Attributes</h2></td></tr> |
| <tr class="memitem:a9ebd2182092b72c2ef98709fcadb647a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classimpala_1_1SpinLock.html">SpinLock</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#a9ebd2182092b72c2ef98709fcadb647a">lock_</a></td></tr> |
| <tr class="separator:a9ebd2182092b72c2ef98709fcadb647a"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ab8a150dfe324078822d7eac38ff75f36"><td class="memItemLeft" align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#ab8a150dfe324078822d7eac38ff75f36">samples_</a> [MAX_SAMPLES]</td></tr> |
| <tr class="separator:ab8a150dfe324078822d7eac38ff75f36"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a86c0e9be3346828585b988ae09cd97bb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#a86c0e9be3346828585b988ae09cd97bb">samples_collected_</a></td></tr> |
| <tr class="memdesc:a86c0e9be3346828585b988ae09cd97bb"><td class="mdescLeft"> </td><td class="mdescRight">Number of samples collected <= MAX_SAMPLES. <a href="#a86c0e9be3346828585b988ae09cd97bb">More...</a><br/></td></tr> |
| <tr class="separator:a86c0e9be3346828585b988ae09cd97bb"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a2f0dad474c4deaa8c21e6ae2302f92d1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#a2f0dad474c4deaa8c21e6ae2302f92d1">period_</a></td></tr> |
| <tr class="memdesc:a2f0dad474c4deaa8c21e6ae2302f92d1"><td class="mdescLeft"> </td><td class="mdescRight">Storage period in ms. <a href="#a2f0dad474c4deaa8c21e6ae2302f92d1">More...</a><br/></td></tr> |
| <tr class="separator:a2f0dad474c4deaa8c21e6ae2302f92d1"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:aebec363f89f7b2c16ad23a6a62b2a50f"><td class="memItemLeft" align="right" valign="top">T </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#aebec363f89f7b2c16ad23a6a62b2a50f">current_sample_sum_</a></td></tr> |
| <tr class="memdesc:aebec363f89f7b2c16ad23a6a62b2a50f"><td class="mdescLeft"> </td><td class="mdescRight">The sum of input samples that makes up the next stored sample. <a href="#aebec363f89f7b2c16ad23a6a62b2a50f">More...</a><br/></td></tr> |
| <tr class="separator:aebec363f89f7b2c16ad23a6a62b2a50f"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:aa97aae981a54abe19bf18b58c4186571"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#aa97aae981a54abe19bf18b58c4186571">current_sample_count_</a></td></tr> |
| <tr class="memdesc:aa97aae981a54abe19bf18b58c4186571"><td class="mdescLeft"> </td><td class="mdescRight">The number of input samples that contribute to current_sample_sum_. <a href="#aa97aae981a54abe19bf18b58c4186571">More...</a><br/></td></tr> |
| <tr class="separator:aa97aae981a54abe19bf18b58c4186571"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ac345c3086fbfc6151ce16ca331735ec3"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classimpala_1_1StreamingSampler.html#ac345c3086fbfc6151ce16ca331735ec3">current_sample_total_time_</a></td></tr> |
| <tr class="memdesc:ac345c3086fbfc6151ce16ca331735ec3"><td class="mdescLeft"> </td><td class="mdescRight">The total time that current_sample_sum_ represents. <a href="#ac345c3086fbfc6151ce16ca331735ec3">More...</a><br/></td></tr> |
| <tr class="separator:ac345c3086fbfc6151ce16ca331735ec3"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><h3>template<typename T, int MAX_SAMPLES><br/> |
| class impala::StreamingSampler< T, MAX_SAMPLES ></h3> |
| |
| <p>A fixed-size sampler to collect samples over time. AddSample should be called periodically with the sampled value. Samples are added at the max resolution possible. When the sample buffer is full, the current samples are collapsed and the collection period is doubled. The input period and the streaming sampler period do not need to match, the streaming sampler will average values. T is the type of the sample and must be a native numerical type (e.g. int or float). </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00032">32</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| <a class="anchor" id="ab4e4381eb77d54a761ec55fb293b4a16"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::<a class="el" href="classimpala_1_1StreamingSampler.html">StreamingSampler</a> </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>initial_period</em> = <code>500</code></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00034">34</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a5089e43e53f322b12701d36fcd00864a"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::<a class="el" href="classimpala_1_1StreamingSampler.html">StreamingSampler</a> </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>period</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const std::vector< T > & </td> |
| <td class="paramname"><em>initial_samples</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Initialize the sampler with values. </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00043">43</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Member Function Documentation</h2> |
| <a class="anchor" id="a853a60d2c09941f91994f3f055a07975"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::AddSample </td> |
| <td>(</td> |
| <td class="paramtype">T </td> |
| <td class="paramname"><em>sample</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>ms</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Add a sample to the sampler. 'ms' is the time elapsed since the last time this was called. The input value is accumulated into current_*. If the total time elapsed in current_sample_total_time_ is higher than the storage period, the value is stored. 'sample' should be interpreted as a representative sample from (now - ms, now]. TODO: we can make this more complex by taking a weighted average of samples accumulated in a period. </p> |
| <p>collapse the samples in half by averaging them and doubling the storage period </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00061">61</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="runtime-profile_8h_source.html#l00325">impala::RuntimeProfile::TimeSeriesCounter::AddSample()</a>, and <a class="el" href="runtime-profile-test_8cc_source.html#l00470">impala::TEST()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a4cb101f4fec78bff4ab4498b4a2a1c89"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">std::string <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::DebugString </td> |
| <td>(</td> |
| <td class="paramtype">const std::string & </td> |
| <td class="paramname"><em>prefix</em> = <code>""</code></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00111">111</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a13ef3347e6f4772e50e52aa7bcbfd98a"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">const T* <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::GetSamples </td> |
| <td>(</td> |
| <td class="paramtype">int * </td> |
| <td class="paramname"><em>num_samples</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">int * </td> |
| <td class="paramname"><em>period</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"><a class="el" href="classimpala_1_1SpinLock.html">SpinLock</a> ** </td> |
| <td class="paramname"><em>lock</em> = <code>NULL</code> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Get the samples collected. Returns the number of samples and the period they were collected at. If lock is non-null, the lock will be taken before returning. The caller must unlock it. </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00088">88</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="runtime-profile_8cc_source.html#l00868">impala::RuntimeProfile::TimeSeriesCounter::ToThrift()</a>, and <a class="el" href="runtime-profile-test_8cc_source.html#l00454">impala::ValidateSampler()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="adb5d140b0d455c14673006bbc1954184"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::SetSamples </td> |
| <td>(</td> |
| <td class="paramtype">int </td> |
| <td class="paramname"><em>period</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const std::vector< T > & </td> |
| <td class="paramname"><em>samples</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Set the underlying data to period/samples. </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00099">99</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Member Data Documentation</h2> |
| <a class="anchor" id="aa97aae981a54abe19bf18b58c4186571"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::current_sample_count_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The number of input samples that contribute to current_sample_sum_. </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00141">141</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="streaming-sampler_8h_source.html#l00061">impala::StreamingSampler< int64_t, 64 >::AddSample()</a>, and <a class="el" href="streaming-sampler_8h_source.html#l00099">impala::StreamingSampler< int64_t, 64 >::SetSamples()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="aebec363f89f7b2c16ad23a6a62b2a50f"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">T <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::current_sample_sum_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The sum of input samples that makes up the next stored sample. </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00138">138</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="streaming-sampler_8h_source.html#l00061">impala::StreamingSampler< int64_t, 64 >::AddSample()</a>, and <a class="el" href="streaming-sampler_8h_source.html#l00099">impala::StreamingSampler< int64_t, 64 >::SetSamples()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ac345c3086fbfc6151ce16ca331735ec3"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::current_sample_total_time_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The total time that current_sample_sum_ represents. </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00144">144</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="streaming-sampler_8h_source.html#l00061">impala::StreamingSampler< int64_t, 64 >::AddSample()</a>, and <a class="el" href="streaming-sampler_8h_source.html#l00099">impala::StreamingSampler< int64_t, 64 >::SetSamples()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a9ebd2182092b72c2ef98709fcadb647a"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classimpala_1_1SpinLock.html">SpinLock</a> <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::lock_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">mutable</span><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00125">125</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="streaming-sampler_8h_source.html#l00061">impala::StreamingSampler< int64_t, 64 >::AddSample()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00111">impala::StreamingSampler< int64_t, 64 >::DebugString()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00088">impala::StreamingSampler< int64_t, 64 >::GetSamples()</a>, and <a class="el" href="streaming-sampler_8h_source.html#l00099">impala::StreamingSampler< int64_t, 64 >::SetSamples()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a2f0dad474c4deaa8c21e6ae2302f92d1"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::period_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Storage period in ms. </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00135">135</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="streaming-sampler_8h_source.html#l00061">impala::StreamingSampler< int64_t, 64 >::AddSample()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00111">impala::StreamingSampler< int64_t, 64 >::DebugString()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00088">impala::StreamingSampler< int64_t, 64 >::GetSamples()</a>, and <a class="el" href="streaming-sampler_8h_source.html#l00099">impala::StreamingSampler< int64_t, 64 >::SetSamples()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="ab8a150dfe324078822d7eac38ff75f36"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">T <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::samples_[MAX_SAMPLES]</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Aggregated samples collected. Note: this is not all the input samples from <a class="el" href="classimpala_1_1StreamingSampler.html#a853a60d2c09941f91994f3f055a07975">AddSample()</a>, as logically, those samples get resampled and aggregated. </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00129">129</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="streaming-sampler_8h_source.html#l00061">impala::StreamingSampler< int64_t, 64 >::AddSample()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00111">impala::StreamingSampler< int64_t, 64 >::DebugString()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00088">impala::StreamingSampler< int64_t, 64 >::GetSamples()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00099">impala::StreamingSampler< int64_t, 64 >::SetSamples()</a>, and <a class="el" href="streaming-sampler_8h_source.html#l00043">impala::StreamingSampler< int64_t, 64 >::StreamingSampler()</a>.</p> |
| |
| </div> |
| </div> |
| <a class="anchor" id="a86c0e9be3346828585b988ae09cd97bb"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename T, int MAX_SAMPLES> </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">int <a class="el" href="classimpala_1_1StreamingSampler.html">impala::StreamingSampler</a>< T, MAX_SAMPLES >::samples_collected_</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">private</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Number of samples collected <= MAX_SAMPLES. </p> |
| |
| <p>Definition at line <a class="el" href="streaming-sampler_8h_source.html#l00132">132</a> of file <a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a>.</p> |
| |
| <p>Referenced by <a class="el" href="streaming-sampler_8h_source.html#l00061">impala::StreamingSampler< int64_t, 64 >::AddSample()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00111">impala::StreamingSampler< int64_t, 64 >::DebugString()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00088">impala::StreamingSampler< int64_t, 64 >::GetSamples()</a>, <a class="el" href="streaming-sampler_8h_source.html#l00099">impala::StreamingSampler< int64_t, 64 >::SetSamples()</a>, and <a class="el" href="streaming-sampler_8h_source.html#l00043">impala::StreamingSampler< int64_t, 64 >::StreamingSampler()</a>.</p> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following file:<ul> |
| <li>be/src/util/<a class="el" href="streaming-sampler_8h_source.html">streaming-sampler.h</a></li> |
| </ul> |
| </div><!-- contents --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <li class="navelem"><a class="el" href="namespaceimpala.html">impala</a></li><li class="navelem"><a class="el" href="classimpala_1_1StreamingSampler.html">StreamingSampler</a></li> |
| <li class="footer">Generated on Thu May 7 2015 16:10:50 for Impala by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li> |
| </ul> |
| </div> |
| </body> |
| </html> |