blob: c78a7318279a70c5cb3044845fc92b18ceae296f [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Coverage Report</title>
<link title="Style" type="text/css" rel="stylesheet" href="css/main.css"/>
<script type="text/javascript" src="js/popup.js"></script>
</head>
<body>
<h5>Coverage Report - com.google.enterprise.adaptor.Journal</h5>
<div class="separator">&nbsp;</div>
<table class="report">
<thead><tr> <td class="heading">Classes in this File</td> <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Line Coverage</a></td> <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Branch Coverage</a></td> <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Complexity</a></td></tr></thead>
<tr><td><a href="com.google.enterprise.adaptor.Journal.html">Journal</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:100px"><span class="text">162/162</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:100px"><span class="text">46/46</span></div></div></td></tr></table></td><td class="value"><span class="hidden">2.257142857142857;</span>2.257</td></tr>
<tr><td><a href="com.google.enterprise.adaptor.Journal.html">Journal$1</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">2.257142857142857;</span>2.257</td></tr>
<tr><td><a href="com.google.enterprise.adaptor.Journal.html">Journal$CompletionStatus</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:100px"><span class="text">4/4</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">2.257142857142857;</span>2.257</td></tr>
<tr><td><a href="com.google.enterprise.adaptor.Journal.html">Journal$JournalSnapshot</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:100px"><span class="text">18/18</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">2.257142857142857;</span>2.257</td></tr>
<tr><td><a href="com.google.enterprise.adaptor.Journal.html">Journal$NegSizeFakeMap</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:100px"><span class="text">2/2</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">2.257142857142857;</span>2.257</td></tr>
<tr><td><a href="com.google.enterprise.adaptor.Journal.html">Journal$Stat</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">2</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:85px"><span class="text">12/14</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">2.257142857142857;</span>2.257</td></tr>
<tr><td><a href="com.google.enterprise.adaptor.Journal.html">Journal$Stats</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">3</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:90px"><span class="text">27/30</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">0</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:100px"><span class="text">12/12</span></div></div></td></tr></table></td><td class="value"><span class="hidden">2.257142857142857;</span>2.257</td></tr>
</table>
<div class="separator">&nbsp;</div>
<table cellspacing="0" cellpadding="0" class="src">
<tr> <td class="numLine">&nbsp;1</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// Copyright 2011 Google Inc. All Rights Reserved.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;2</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;3</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// Licensed under the Apache License, Version 2.0 (the "License");</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;4</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// you may not use this file except in compliance with the License.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;5</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// You may obtain a copy of the License at</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;6</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;7</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// http://www.apache.org/licenses/LICENSE-2.0</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;8</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">//</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;9</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// Unless required by applicable law or agreed to in writing, software</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;10</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// distributed under the License is distributed on an "AS IS" BASIS,</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;11</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;12</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// See the License for the specific language governing permissions and</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;13</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">// limitations under the License.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;14</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;15</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="keyword">package</span> com.google.enterprise.adaptor;</pre></td></tr>
<tr> <td class="numLine">&nbsp;16</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;17</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.HashMap;</pre></td></tr>
<tr> <td class="numLine">&nbsp;18</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.List;</pre></td></tr>
<tr> <td class="numLine">&nbsp;19</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="keyword">import</span> java.util.Map;</pre></td></tr>
<tr> <td class="numLine">&nbsp;20</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;21</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;22</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Contains registers and stats regarding runtime.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;23</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;24</td> <td class="nbHitsCovered">&nbsp;350</td> <td class="src"><pre class="src">&nbsp;<span class="keyword">class</span> Journal {</pre></td></tr>
<tr> <td class="numLine">&nbsp;25</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> Map&lt;DocId, Integer&gt; timesPushed;</pre></td></tr>
<tr> <td class="numLine">&nbsp;26</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> totalPushes;</pre></td></tr>
<tr> <td class="numLine">&nbsp;27</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;28</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> Map&lt;DocId, Integer&gt; timesGsaRequested;</pre></td></tr>
<tr> <td class="numLine">&nbsp;29</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> totalGsaRequests;</pre></td></tr>
<tr> <td class="numLine">&nbsp;30</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;31</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> Map&lt;DocId, Integer&gt; timesNonGsaRequested;</pre></td></tr>
<tr> <td class="numLine">&nbsp;32</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> totalNonGsaRequests;</pre></td></tr>
<tr> <td class="numLine">&nbsp;33</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;34</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">final</span> TimeProvider timeProvider;</pre></td></tr>
<tr> <td class="numLine">&nbsp;35</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">final</span> <span class="keyword">long</span> startedAt;</pre></td></tr>
<tr> <td class="numLine">&nbsp;36</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;37</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Resolution of {@link System#currentTypeMillis()} to the millisecond.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;38</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;39</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">final</span> <span class="keyword">long</span> timeResolution;</pre></td></tr>
<tr> <td class="numLine">&nbsp;40</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;41</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;42</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Time-based bookkeeping for charts. Each element in the array is for a</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;43</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * different time period.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;44</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;45</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> Stats[] timeStats;</pre></td></tr>
<tr> <td class="numLine">&nbsp;46</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> Stats dayStatsByHalfHour;</pre></td></tr>
<tr> <td class="numLine">&nbsp;47</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;48</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/** Request processing start time storage until processing completion. */</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;49</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> ThreadLocal&lt;Long&gt; requestProcessingStart = <span class="keyword">new</span> ThreadLocal&lt;Long&gt;();</pre></td></tr>
<tr> <td class="numLine">&nbsp;50</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;51</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;52</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Date in milliseconds of current full push start. If zero, then there is not</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;53</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * a running full push.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;54</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;55</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> currentFullPushStart;</pre></td></tr>
<tr> <td class="numLine">&nbsp;56</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/** Date in milliseconds. */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;57</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> lastSuccessfulFullPushStart;</pre></td></tr>
<tr> <td class="numLine">&nbsp;58</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/** Date in milliseconds. */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;59</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> lastSuccessfulFullPushEnd;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;60</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> CompletionStatus lastFullPushStatus = CompletionStatus.SUCCESS;</pre></td></tr>
<tr> <td class="numLine">&nbsp;61</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;62</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> currentIncrementalPushStart;</pre></td></tr>
<tr> <td class="numLine">&nbsp;63</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> lastSuccessfulIncrementalPushStart;</pre></td></tr>
<tr> <td class="numLine">&nbsp;64</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> lastSuccessfulIncrementalPushEnd;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;65</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> CompletionStatus lastIncrementalPushStatus = CompletionStatus.SUCCESS;</pre></td></tr>
<tr> <td class="numLine">&nbsp;66</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;67</td> <td class="nbHitsCovered">&nbsp;5</td> <td class="src"><pre class="src">&nbsp; enum CompletionStatus {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;68</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; SUCCESS,</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;69</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; INTERRUPTION,</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;70</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; FAILURE,</pre></td></tr>
<tr> <td class="numLine">&nbsp;71</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;72</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;73</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;74</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * @param reducedMem whether to use a fixed amount of memory, at the expense</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;75</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * of some statistics being disabled</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;76</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;77</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">public</span> Journal(<span class="keyword">boolean</span> reducedMem) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;78</td> <td class="nbHitsCovered">&nbsp;44</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>(reducedMem, <span class="keyword">new</span> SystemTimeProvider());</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;79</td> <td class="nbHitsCovered">&nbsp;44</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;80</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;81</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;82</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Same as {@code Journal(false, timeProvider)}.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;83</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;84</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">protected</span> Journal(TimeProvider timeProvider) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;85</td> <td class="nbHitsCovered">&nbsp;165</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>(<span class="keyword">false</span>, timeProvider);</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;86</td> <td class="nbHitsCovered">&nbsp;165</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;87</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;88</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">protected</span> Journal(<span class="keyword">boolean</span> reducedMem, TimeProvider timeProvider) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;89</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.timeProvider = timeProvider;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;90</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.startedAt = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;91</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.timeResolution = determineTimeResolution();</pre></td></tr>
<tr> <td class="numLine">&nbsp;92</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// We want data within the Stats to agree with each other, so we provide the</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;93</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// same time to each of them.</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;94</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> time = startedAt;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;95</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.timeStats = <span class="keyword">new</span> Stats[] {</pre></td></tr>
<tr> <td class="numLine">&nbsp;96</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">new</span> Stats(60, 1000, time), <span class="comment">/* one minute, second granularity */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;97</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">new</span> Stats(60, 1000 * 60, time), <span class="comment">/* one hour, minute granularity */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;98</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">new</span> Stats(48, 1000 * 60 * 30, time), <span class="comment">/* one day, half-hour granularity */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;99</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; };</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;100</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.dayStatsByHalfHour = <span class="keyword">this</span>.timeStats[<span class="keyword">this</span>.timeStats.length - 1];</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;101</td> <td class="nbHitsCovered"><a title="Line 101: Conditional coverage 100% (2/2).">&nbsp;211</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 101: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (reducedMem) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;102</td> <td class="nbHitsCovered">&nbsp;45</td> <td class="src"><pre class="src">&nbsp; timesPushed = <span class="keyword">new</span> NegSizeFakeMap&lt;DocId, Integer&gt;();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;103</td> <td class="nbHitsCovered">&nbsp;45</td> <td class="src"><pre class="src">&nbsp; timesGsaRequested = <span class="keyword">new</span> NegSizeFakeMap&lt;DocId, Integer&gt;();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;104</td> <td class="nbHitsCovered">&nbsp;45</td> <td class="src"><pre class="src">&nbsp; timesNonGsaRequested = <span class="keyword">new</span> NegSizeFakeMap&lt;DocId, Integer&gt;();</pre></td></tr>
<tr> <td class="numLine">&nbsp;105</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; } <span class="keyword">else</span> {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;106</td> <td class="nbHitsCovered">&nbsp;166</td> <td class="src"><pre class="src">&nbsp; timesPushed = <span class="keyword">new</span> HashMap&lt;DocId, Integer&gt;();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;107</td> <td class="nbHitsCovered">&nbsp;166</td> <td class="src"><pre class="src">&nbsp; timesGsaRequested = <span class="keyword">new</span> HashMap&lt;DocId, Integer&gt;();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;108</td> <td class="nbHitsCovered">&nbsp;166</td> <td class="src"><pre class="src">&nbsp; timesNonGsaRequested = <span class="keyword">new</span> HashMap&lt;DocId, Integer&gt;();</pre></td></tr>
<tr> <td class="numLine">&nbsp;109</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;110</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;111</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;112</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> <span class="keyword">void</span> recordDocIdPush(List&lt;? <span class="keyword">extends</span> DocIdSender.Item&gt; pushed) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;113</td> <td class="nbHitsCovered"><a title="Line 113: Conditional coverage 100% (2/2).">&nbsp;11</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 113: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (Object item : pushed) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;114</td> <td class="nbHitsCovered"><a title="Line 114: Conditional coverage 100% (2/2).">&nbsp;20</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 114: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (item <span class="keyword">instanceof</span> DocIdPusher.Record) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;115</td> <td class="nbHitsCovered">&nbsp;18</td> <td class="src"><pre class="src">&nbsp; DocIdPusher.Record record = (DocIdPusher.Record) item;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;116</td> <td class="nbHitsCovered">&nbsp;18</td> <td class="src"><pre class="src">&nbsp; increment(timesPushed, record.getDocId());</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;117</td> <td class="nbHitsCovered"><a title="Line 117: Conditional coverage 100% (2/2).">&nbsp;18</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 117: Conditional coverage 100% (2/2)."> } <span class="keyword">else</span> <span class="keyword">if</span> (item <span class="keyword">instanceof</span> DocIdSender.AclItem) {</a></pre></td></tr>
<tr> <td class="numLine">&nbsp;118</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Don't record any information.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;119</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; } <span class="keyword">else</span> {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;120</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> IllegalArgumentException(<span class="string">"Unsupported class: "</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;121</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; + item.getClass().getName());</pre></td></tr>
<tr> <td class="numLine">&nbsp;122</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;123</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;124</td> <td class="nbHitsCovered">&nbsp;10</td> <td class="src"><pre class="src">&nbsp; totalPushes += pushed.size();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;125</td> <td class="nbHitsCovered">&nbsp;10</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;126</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;127</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">void</span> recordGsaContentRequest(DocId docId) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;128</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> time = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;129</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> (<span class="keyword">this</span>) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;130</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; increment(timesGsaRequested, docId);</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;131</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; totalGsaRequests++;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;132</td> <td class="nbHitsCovered"><a title="Line 132: Conditional coverage 100% (2/2).">&nbsp;104</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 132: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (Stats stats : timeStats) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;133</td> <td class="nbHitsCovered">&nbsp;78</td> <td class="src"><pre class="src">&nbsp; Stat stat = stats.getCurrentStat(time);</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;134</td> <td class="nbHitsCovered">&nbsp;78</td> <td class="src"><pre class="src">&nbsp; stat.gsaRetrievedDocument = <span class="keyword">true</span>;</pre></td></tr>
<tr> <td class="numLine">&nbsp;135</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;136</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;137</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;138</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;139</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> <span class="keyword">void</span> recordNonGsaContentRequest(DocId requested) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;140</td> <td class="nbHitsCovered">&nbsp;41</td> <td class="src"><pre class="src">&nbsp; increment(timesNonGsaRequested, requested); </pre></td></tr>
<tr> <td class="numLineCover">&nbsp;141</td> <td class="nbHitsCovered">&nbsp;41</td> <td class="src"><pre class="src">&nbsp; totalNonGsaRequests++;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;142</td> <td class="nbHitsCovered">&nbsp;41</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;143</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;144</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;145</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that the processing of a request has been started on this thread.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;146</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * This relates to internal computation required to satisfy the request.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;147</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;148</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">void</span> recordRequestProcessingStart() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;149</td> <td class="nbHitsCovered">&nbsp;81</td> <td class="src"><pre class="src">&nbsp; requestProcessingStart.set(timeProvider.currentTimeMillis());</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;150</td> <td class="nbHitsCovered">&nbsp;81</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;151</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;152</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;153</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that the processing this thread was performing to satisfy the</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;154</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * request has completed.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;155</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;156</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">void</span> recordRequestProcessingEnd(<span class="keyword">long</span> responseSize) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;157</td> <td class="nbHitsCovered">&nbsp;56</td> <td class="src"><pre class="src">&nbsp; recordRequestProcessingEnd(responseSize, timeProvider.currentTimeMillis());</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;158</td> <td class="nbHitsCovered">&nbsp;55</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;159</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;160</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">void</span> recordRequestProcessingEnd(<span class="keyword">long</span> responseSize, <span class="keyword">long</span> time) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;161</td> <td class="nbHitsCovered">&nbsp;82</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> duration = endDuration(requestProcessingStart, time);</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;162</td> <td class="nbHitsCovered">&nbsp;81</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> (<span class="keyword">this</span>) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;163</td> <td class="nbHitsCovered"><a title="Line 163: Conditional coverage 100% (2/2).">&nbsp;324</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 163: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (Stats stats : timeStats) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;164</td> <td class="nbHitsCovered">&nbsp;243</td> <td class="src"><pre class="src">&nbsp; Stat stat = stats.getCurrentStat(time);</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;165</td> <td class="nbHitsCovered">&nbsp;243</td> <td class="src"><pre class="src">&nbsp; stat.requestProcessingsCount++;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;166</td> <td class="nbHitsCovered">&nbsp;243</td> <td class="src"><pre class="src">&nbsp; stat.requestProcessingsDurationSum += duration;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;167</td> <td class="nbHitsCovered">&nbsp;243</td> <td class="src"><pre class="src">&nbsp; stat.requestProcessingsMaxDuration = Math.max(</pre></td></tr>
<tr> <td class="numLine">&nbsp;168</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; stat.requestProcessingsMaxDuration, duration);</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;169</td> <td class="nbHitsCovered">&nbsp;243</td> <td class="src"><pre class="src">&nbsp; stat.requestProcessingsThroughput += responseSize;</pre></td></tr>
<tr> <td class="numLine">&nbsp;170</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;171</td> <td class="nbHitsCovered">&nbsp;81</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;172</td> <td class="nbHitsCovered">&nbsp;81</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;173</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;174</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;175</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that the processing this thread was performing to satisfy the</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;176</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * request has completed, but with an error.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;177</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;178</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">void</span> recordRequestProcessingFailure() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;179</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> time = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;180</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> (<span class="keyword">this</span>) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;181</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; recordRequestProcessingEnd(0, time);</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;182</td> <td class="nbHitsCovered"><a title="Line 182: Conditional coverage 100% (2/2).">&nbsp;104</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 182: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (Stats stats : timeStats) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;183</td> <td class="nbHitsCovered">&nbsp;78</td> <td class="src"><pre class="src">&nbsp; Stat stat = stats.getCurrentStat(time);</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;184</td> <td class="nbHitsCovered">&nbsp;78</td> <td class="src"><pre class="src">&nbsp; stat.requestProcessingsFailureCount++;</pre></td></tr>
<tr> <td class="numLine">&nbsp;185</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;186</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;187</td> <td class="nbHitsCovered">&nbsp;26</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;188</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;189</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> endDuration(ThreadLocal&lt;Long&gt; localStartTime, <span class="keyword">long</span> endTime) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;190</td> <td class="nbHitsCovered">&nbsp;82</td> <td class="src"><pre class="src">&nbsp; Long startTime = localStartTime.get();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;191</td> <td class="nbHitsCovered">&nbsp;82</td> <td class="src"><pre class="src">&nbsp; localStartTime.remove();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;192</td> <td class="nbHitsCovered"><a title="Line 192: Conditional coverage 100% (2/2).">&nbsp;82</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 192: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (startTime == <span class="keyword">null</span>) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;193</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> IllegalStateException(<span class="string">"Record start must be called before "</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;194</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; + <span class="string">"record end"</span>);</pre></td></tr>
<tr> <td class="numLine">&nbsp;195</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;196</td> <td class="nbHitsCovered">&nbsp;81</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> endTime - startTime;</pre></td></tr>
<tr> <td class="numLine">&nbsp;197</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;198</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;199</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;200</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Determine the resolution that {@link System#currentTimeMillis} supports, in</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;201</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * milliseconds.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;202</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;203</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> determineTimeResolution() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;204</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> resolution = Long.MAX_VALUE;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;205</td> <td class="nbHitsCovered"><a title="Line 205: Conditional coverage 100% (2/2).">&nbsp;1266</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 205: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; 5; i++) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;206</td> <td class="nbHitsCovered">&nbsp;1055</td> <td class="src"><pre class="src">&nbsp; resolution = Math.min(resolution, determineTimeResolutionOnce());</pre></td></tr>
<tr> <td class="numLine">&nbsp;207</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;208</td> <td class="nbHitsCovered">&nbsp;211</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> resolution;</pre></td></tr>
<tr> <td class="numLine">&nbsp;209</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;210</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;211</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;212</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * One trial of determining the resolution that {@link</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;213</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * System#currentTimeMillis} supports, in milliseconds.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;214</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;215</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">long</span> determineTimeResolutionOnce() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;216</td> <td class="nbHitsCovered">&nbsp;1055</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> time = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;217</td> <td class="nbHitsCovered">&nbsp;1055</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> startTime = time;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;218</td> <td class="nbHitsCovered"><a title="Line 218: Conditional coverage 100% (2/2).">&nbsp;154208</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 218: Conditional coverage 100% (2/2)."> <span class="keyword">while</span> (startTime == time) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;219</td> <td class="nbHitsCovered">&nbsp;153153</td> <td class="src"><pre class="src">&nbsp; time = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLine">&nbsp;220</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;221</td> <td class="nbHitsCovered">&nbsp;1055</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> time - startTime;</pre></td></tr>
<tr> <td class="numLine">&nbsp;222</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;223</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;224</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">void</span> increment(Map&lt;DocId, Integer&gt; counts, DocId id) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;225</td> <td class="nbHitsCovered"><a title="Line 225: Conditional coverage 100% (2/2).">&nbsp;85</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 225: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (!counts.containsKey(id)) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;226</td> <td class="nbHitsCovered">&nbsp;72</td> <td class="src"><pre class="src">&nbsp; counts.put(id, 1);</pre></td></tr>
<tr> <td class="numLine">&nbsp;227</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; } <span class="keyword">else</span> {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;228</td> <td class="nbHitsCovered">&nbsp;13</td> <td class="src"><pre class="src">&nbsp; counts.put(id, 1 + counts.get(id));</pre></td></tr>
<tr> <td class="numLine">&nbsp;229</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;230</td> <td class="nbHitsCovered">&nbsp;85</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;231</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;232</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;233</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that a full push has started. Only one is tracked at a time.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;234</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;235</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> <span class="keyword">void</span> recordFullPushStarted() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;236</td> <td class="nbHitsCovered"><a title="Line 236: Conditional coverage 100% (2/2).">&nbsp;21</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 236: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (currentFullPushStart != 0) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;237</td> <td class="nbHitsCovered">&nbsp;2</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> IllegalStateException(<span class="string">"Full push already started"</span>);</pre></td></tr>
<tr> <td class="numLine">&nbsp;238</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;239</td> <td class="nbHitsCovered">&nbsp;19</td> <td class="src"><pre class="src">&nbsp; currentFullPushStart = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;240</td> <td class="nbHitsCovered">&nbsp;19</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;241</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;242</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;243</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that the full push completed successfully.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;244</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;245</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">void</span> recordFullPushSuccessful() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;246</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> endTime = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;247</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> (<span class="keyword">this</span>) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;248</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> startTime = currentFullPushStart;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;249</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; currentFullPushStart = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;250</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.lastSuccessfulFullPushStart = startTime;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;251</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.lastSuccessfulFullPushEnd = endTime;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;252</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; lastFullPushStatus = CompletionStatus.SUCCESS;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;253</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;254</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;255</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;256</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;257</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that the full push was interrupted prematurely.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;258</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;259</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> <span class="keyword">void</span> recordFullPushInterrupted() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;260</td> <td class="nbHitsCovered"><a title="Line 260: Conditional coverage 100% (2/2).">&nbsp;4</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 260: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (currentFullPushStart == 0) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;261</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> IllegalStateException(<span class="string">"Full push not already started"</span>);</pre></td></tr>
<tr> <td class="numLine">&nbsp;262</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;263</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; currentFullPushStart = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;264</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; lastFullPushStatus = CompletionStatus.INTERRUPTION;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;265</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;266</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;267</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;268</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that the full push was interrupted prematurely.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;269</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;270</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> <span class="keyword">void</span> recordFullPushFailed() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;271</td> <td class="nbHitsCovered"><a title="Line 271: Conditional coverage 100% (2/2).">&nbsp;4</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 271: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (currentFullPushStart == 0) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;272</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> IllegalStateException(<span class="string">"Full push not already started"</span>);</pre></td></tr>
<tr> <td class="numLine">&nbsp;273</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;274</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; currentFullPushStart = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;275</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; lastFullPushStatus = CompletionStatus.FAILURE;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;276</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;277</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;278</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> CompletionStatus getLastFullPushStatus() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;279</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> lastFullPushStatus;</pre></td></tr>
<tr> <td class="numLine">&nbsp;280</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;281</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;282</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;283</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that an incremental push has started.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;284</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;285</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> <span class="keyword">void</span> recordIncrementalPushStarted() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;286</td> <td class="nbHitsCovered"><a title="Line 286: Conditional coverage 100% (2/2).">&nbsp;10</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 286: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (currentIncrementalPushStart != 0) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;287</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> IllegalStateException(<span class="string">"Incremental push already started"</span>);</pre></td></tr>
<tr> <td class="numLine">&nbsp;288</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;289</td> <td class="nbHitsCovered">&nbsp;9</td> <td class="src"><pre class="src">&nbsp; currentIncrementalPushStart = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;290</td> <td class="nbHitsCovered">&nbsp;9</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;291</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;292</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;293</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that the incremental push completed successfully.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;294</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;295</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">void</span> recordIncrementalPushSuccessful() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;296</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> endTime = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;297</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> (<span class="keyword">this</span>) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;298</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> startTime = currentIncrementalPushStart;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;299</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; currentIncrementalPushStart = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;300</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.lastSuccessfulIncrementalPushStart = startTime;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;301</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.lastSuccessfulIncrementalPushEnd = endTime;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;302</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; lastIncrementalPushStatus = CompletionStatus.SUCCESS;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;303</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;304</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;305</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;306</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;307</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that the incremental push was interrupted prematurely.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;308</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;309</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> <span class="keyword">void</span> recordIncrementalPushInterrupted() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;310</td> <td class="nbHitsCovered"><a title="Line 310: Conditional coverage 100% (2/2).">&nbsp;3</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 310: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (currentIncrementalPushStart == 0) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;311</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> IllegalStateException(<span class="string">"Incremental push not already started"</span>);</pre></td></tr>
<tr> <td class="numLine">&nbsp;312</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;313</td> <td class="nbHitsCovered">&nbsp;2</td> <td class="src"><pre class="src">&nbsp; currentIncrementalPushStart = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;314</td> <td class="nbHitsCovered">&nbsp;2</td> <td class="src"><pre class="src">&nbsp; lastIncrementalPushStatus = CompletionStatus.INTERRUPTION;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;315</td> <td class="nbHitsCovered">&nbsp;2</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;316</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;317</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;318</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Record that the incremental push was interrupted prematurely.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;319</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;320</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> <span class="keyword">void</span> recordIncrementalPushFailed() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;321</td> <td class="nbHitsCovered"><a title="Line 321: Conditional coverage 100% (2/2).">&nbsp;3</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 321: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (currentIncrementalPushStart == 0) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;322</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> IllegalStateException(<span class="string">"Incremental push not already started"</span>);</pre></td></tr>
<tr> <td class="numLine">&nbsp;323</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;324</td> <td class="nbHitsCovered">&nbsp;2</td> <td class="src"><pre class="src">&nbsp; currentIncrementalPushStart = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;325</td> <td class="nbHitsCovered">&nbsp;2</td> <td class="src"><pre class="src">&nbsp; lastIncrementalPushStatus = CompletionStatus.FAILURE;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;326</td> <td class="nbHitsCovered">&nbsp;2</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;327</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;328</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> CompletionStatus getLastIncrementalPushStatus() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;329</td> <td class="nbHitsCovered">&nbsp;4</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> lastIncrementalPushStatus;</pre></td></tr>
<tr> <td class="numLine">&nbsp;330</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;331</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;332</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">double</span> getRetrieverErrorRate(<span class="keyword">long</span> maxCount) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;333</td> <td class="nbHitsCovered">&nbsp;6</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> currentTime = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;334</td> <td class="nbHitsCovered">&nbsp;6</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> count = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;335</td> <td class="nbHitsCovered">&nbsp;6</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> failures = 0;</pre></td></tr>
<tr> <td class="numLine">&nbsp;336</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;337</td> <td class="nbHitsCovered">&nbsp;6</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> (Journal.<span class="keyword">this</span>) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;338</td> <td class="nbHitsCovered">&nbsp;6</td> <td class="src"><pre class="src">&nbsp; Stats stats = dayStatsByHalfHour;</pre></td></tr>
<tr> <td class="numLine">&nbsp;339</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Update bookkeeping.</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;340</td> <td class="nbHitsCovered">&nbsp;6</td> <td class="src"><pre class="src">&nbsp; stats.getCurrentStat(currentTime);</pre></td></tr>
<tr> <td class="numLine">&nbsp;341</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;342</td> <td class="nbHitsCovered"><a title="Line 342: Conditional coverage 100% (4/4) [each condition: 100%, 100%].">&nbsp;155</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 342: Conditional coverage 100% (4/4) [each condition: 100%, 100%]."> <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; stats.stats.length &amp;&amp; count &lt; maxCount; i++) {</a></pre></td></tr>
<tr> <td class="numLine">&nbsp;343</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Walk through indexes in reverse order, starting with most current.</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;344</td> <td class="nbHitsCovered">&nbsp;149</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">int</span> index = (stats.currentStat - i + stats.stats.length)</pre></td></tr>
<tr> <td class="numLine">&nbsp;345</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; % stats.stats.length;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;346</td> <td class="nbHitsCovered">&nbsp;149</td> <td class="src"><pre class="src">&nbsp; Stat stat = stats.stats[index];</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;347</td> <td class="nbHitsCovered">&nbsp;149</td> <td class="src"><pre class="src">&nbsp; count += stat.requestProcessingsCount;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;348</td> <td class="nbHitsCovered">&nbsp;149</td> <td class="src"><pre class="src">&nbsp; failures += stat.requestProcessingsFailureCount;</pre></td></tr>
<tr> <td class="numLine">&nbsp;349</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;350</td> <td class="nbHitsCovered">&nbsp;6</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;351</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;352</td> <td class="nbHitsCovered">&nbsp;6</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">double</span> rate = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;353</td> <td class="nbHitsCovered"><a title="Line 353: Conditional coverage 100% (2/2).">&nbsp;6</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 353: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (count &gt; 0) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;354</td> <td class="nbHitsCovered">&nbsp;5</td> <td class="src"><pre class="src">&nbsp; rate = failures / (<span class="keyword">double</span>) count;</pre></td></tr>
<tr> <td class="numLine">&nbsp;355</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;356</td> <td class="nbHitsCovered">&nbsp;6</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> rate;</pre></td></tr>
<tr> <td class="numLine">&nbsp;357</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;358</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;359</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">boolean</span> hasGsaCrawledWithinLastDay() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;360</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> currentTime = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;361</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> (Journal.<span class="keyword">this</span>) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;362</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; Stats stats = dayStatsByHalfHour;</pre></td></tr>
<tr> <td class="numLine">&nbsp;363</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Update bookkeeping.</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;364</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; stats.getCurrentStat(currentTime);</pre></td></tr>
<tr> <td class="numLine">&nbsp;365</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;366</td> <td class="nbHitsCovered"><a title="Line 366: Conditional coverage 100% (2/2).">&nbsp;99</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 366: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (Stat stat : stats.stats) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;367</td> <td class="nbHitsCovered"><a title="Line 367: Conditional coverage 100% (2/2).">&nbsp;97</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 367: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (stat.gsaRetrievedDocument) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;368</td> <td class="nbHitsCovered">&nbsp;1</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> <span class="keyword">true</span>;</pre></td></tr>
<tr> <td class="numLine">&nbsp;369</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;370</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;371</td> <td class="nbHitsCovered">&nbsp;2</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;372</td> <td class="nbHitsCovered">&nbsp;2</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> <span class="keyword">false</span>;</pre></td></tr>
<tr> <td class="numLine">&nbsp;373</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;374</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;375</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;376</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Access to the timeStats for use in {@link DashboardHandler} only.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;377</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;378</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">synchronized</span> JournalSnapshot getSnapshot() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;379</td> <td class="nbHitsCovered">&nbsp;24</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> currentTime = timeProvider.currentTimeMillis();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;380</td> <td class="nbHitsCovered">&nbsp;24</td> <td class="src"><pre class="src">&nbsp; Stats[] timeStatsClone = <span class="keyword">new</span> Stats[timeStats.length];</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;381</td> <td class="nbHitsCovered"><a title="Line 381: Conditional coverage 100% (2/2).">&nbsp;96</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 381: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; timeStats.length; i++) {</a></pre></td></tr>
<tr> <td class="numLine">&nbsp;382</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Cause stats to update its internal structures</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;383</td> <td class="nbHitsCovered">&nbsp;72</td> <td class="src"><pre class="src">&nbsp; timeStats[i].getCurrentStat(currentTime);</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;384</td> <td class="nbHitsCovered">&nbsp;72</td> <td class="src"><pre class="src">&nbsp; timeStatsClone[i] = timeStats[i].clone();</pre></td></tr>
<tr> <td class="numLine">&nbsp;385</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;386</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;387</td> <td class="nbHitsCovered">&nbsp;24</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> <span class="keyword">new</span> JournalSnapshot(<span class="keyword">this</span>, currentTime, timeStatsClone);</pre></td></tr>
<tr> <td class="numLine">&nbsp;388</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;389</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;390</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">static</span> <span class="keyword">class</span> JournalSnapshot {</pre></td></tr>
<tr> <td class="numLine">&nbsp;391</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> numUniqueDocIdsPushed;</pre></td></tr>
<tr> <td class="numLine">&nbsp;392</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> numTotalDocIdsPushed;</pre></td></tr>
<tr> <td class="numLine">&nbsp;393</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> numUniqueGsaRequests;</pre></td></tr>
<tr> <td class="numLine">&nbsp;394</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> numTotalGsaRequests;</pre></td></tr>
<tr> <td class="numLine">&nbsp;395</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> numUniqueNonGsaRequests;</pre></td></tr>
<tr> <td class="numLine">&nbsp;396</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> numTotalNonGsaRequests;</pre></td></tr>
<tr> <td class="numLine">&nbsp;397</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> whenStarted;</pre></td></tr>
<tr> <td class="numLine">&nbsp;398</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> currentTime;</pre></td></tr>
<tr> <td class="numLine">&nbsp;399</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> timeResolution;</pre></td></tr>
<tr> <td class="numLine">&nbsp;400</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> lastSuccessfulFullPushStart;</pre></td></tr>
<tr> <td class="numLine">&nbsp;401</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> lastSuccessfulFullPushEnd;</pre></td></tr>
<tr> <td class="numLine">&nbsp;402</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> currentFullPushStart;</pre></td></tr>
<tr> <td class="numLine">&nbsp;403</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> lastSuccessfulIncrementalPushStart;</pre></td></tr>
<tr> <td class="numLine">&nbsp;404</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> lastSuccessfulIncrementalPushEnd;</pre></td></tr>
<tr> <td class="numLine">&nbsp;405</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> <span class="keyword">long</span> currentIncrementalPushStart;</pre></td></tr>
<tr> <td class="numLine">&nbsp;406</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">final</span> Stats[] timeStats;</pre></td></tr>
<tr> <td class="numLine">&nbsp;407</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;408</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; JournalSnapshot(Journal journal, <span class="keyword">long</span> currentTime, Stats[] timeStatsClone) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;409</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.numUniqueDocIdsPushed = journal.timesPushed.size();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;410</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.numTotalDocIdsPushed = journal.totalPushes;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;411</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.numUniqueGsaRequests = journal.timesGsaRequested.size();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;412</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.numTotalGsaRequests = journal.totalGsaRequests;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;413</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.numUniqueNonGsaRequests = journal.timesNonGsaRequested.size();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;414</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.numTotalNonGsaRequests = journal.totalNonGsaRequests;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;415</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.timeResolution = journal.timeResolution;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;416</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.lastSuccessfulFullPushStart = journal.lastSuccessfulFullPushStart;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;417</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.lastSuccessfulFullPushEnd = journal.lastSuccessfulFullPushEnd;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;418</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.currentFullPushStart = journal.currentFullPushStart;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;419</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.lastSuccessfulIncrementalPushStart</pre></td></tr>
<tr> <td class="numLine">&nbsp;420</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; = journal.lastSuccessfulIncrementalPushStart;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;421</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.lastSuccessfulIncrementalPushEnd</pre></td></tr>
<tr> <td class="numLine">&nbsp;422</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; = journal.lastSuccessfulIncrementalPushEnd;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;423</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.currentIncrementalPushStart = journal.currentIncrementalPushStart;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;424</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.whenStarted = journal.startedAt;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;425</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.currentTime = currentTime;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;426</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.timeStats = timeStatsClone;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;427</td> <td class="nbHitsCovered">&nbsp;25</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;428</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;429</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;430</td> <td class="nbHitsUncovered">&nbsp;0</td> <td class="src"><pre class="src"><span class="srcUncovered">&nbsp; <span class="keyword">static</span> <span class="keyword">class</span> Stats <span class="keyword">implements</span> Cloneable {</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;431</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;432</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Circular buffer containing all the statistics this object contains. When</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;433</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * the current {@link Stat} "expires", {@link #currentStat} is incremented</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;434</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * (floor {@code stats.length}) and the new current {@code Stat} object is</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;435</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * reset.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;436</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;437</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; Stat[] stats;</pre></td></tr>
<tr> <td class="numLine">&nbsp;438</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;439</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * The amount of time each {@link Stat} object's statistics were measured.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;440</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;441</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> snapshotDurationMs;</pre></td></tr>
<tr> <td class="numLine">&nbsp;442</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;443</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Current {@link Stat} object within {@link #stats}. All incoming</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;444</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * statistics should update the current {@code Stat} object.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;445</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;446</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">int</span> currentStat;</pre></td></tr>
<tr> <td class="numLine">&nbsp;447</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;448</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Time that the current {@link Stat} object will expire and {@link</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;449</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * #currentStat} will be incremented.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;450</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;451</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> pendingStatPeriodEnd;</pre></td></tr>
<tr> <td class="numLine">&nbsp;452</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;453</td> <td class="nbHitsCovered">&nbsp;634</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">public</span> Stats(<span class="keyword">int</span> statCount, <span class="keyword">long</span> snapshotDuration, <span class="keyword">long</span> currentTime) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;454</td> <td class="nbHitsCovered">&nbsp;634</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.snapshotDurationMs = snapshotDuration;</pre></td></tr>
<tr> <td class="numLine">&nbsp;455</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;456</td> <td class="nbHitsCovered">&nbsp;634</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.stats = <span class="keyword">new</span> Stat[statCount];</pre></td></tr>
<tr> <td class="numLine">&nbsp;457</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Pre-allocate all Stat objects</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;458</td> <td class="nbHitsCovered"><a title="Line 458: Conditional coverage 100% (2/2).">&nbsp;36084</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 458: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; <span class="keyword">this</span>.stats.length; i++) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;459</td> <td class="nbHitsCovered">&nbsp;35450</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.stats[i] = <span class="keyword">new</span> Stat();</pre></td></tr>
<tr> <td class="numLine">&nbsp;460</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;461</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;462</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Initialize expiration times for pendingStat objects</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;463</td> <td class="nbHitsCovered">&nbsp;634</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> duration = <span class="keyword">this</span>.snapshotDurationMs;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;464</td> <td class="nbHitsCovered">&nbsp;634</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">this</span>.pendingStatPeriodEnd = ((currentTime / duration) * duration)</pre></td></tr>
<tr> <td class="numLine">&nbsp;465</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; + duration;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;466</td> <td class="nbHitsCovered">&nbsp;634</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;467</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;468</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;469</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Retrive the current {@code Stat} object that applies to {@code</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;470</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * currentTime}. {@code currentTime} is expected to be an actual point in</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;471</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * time while the caller was holding the lock on {@link Journal}. It may</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;472</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * never be less than the previous call.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;473</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;474</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">public</span> Stat getCurrentStat(<span class="keyword">long</span> currentTime) {</pre></td></tr>
<tr> <td class="numLine">&nbsp;475</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Check if the current Stat object is still valid to write to</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;476</td> <td class="nbHitsCovered"><a title="Line 476: Conditional coverage 100% (2/2).">&nbsp;480</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 476: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (pendingStatPeriodEnd &gt; currentTime) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;477</td> <td class="nbHitsCovered">&nbsp;465</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> stats[currentStat];</pre></td></tr>
<tr> <td class="numLine">&nbsp;478</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;479</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Check if all the Stat objects are invalid. This occurs when the last</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;480</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// request was a long time ago.</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;481</td> <td class="nbHitsCovered"><a title="Line 481: Conditional coverage 100% (2/2).">&nbsp;15</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 481: Conditional coverage 100% (2/2)."> <span class="keyword">if</span> (currentTime - pendingStatPeriodEnd</a></pre></td></tr>
<tr> <td class="numLine">&nbsp;482</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; &gt; snapshotDurationMs * stats.length) {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;483</td> <td class="nbHitsCovered"><a title="Line 483: Conditional coverage 100% (2/2).">&nbsp;403</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 483: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; stats.length; i++) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;484</td> <td class="nbHitsCovered">&nbsp;396</td> <td class="src"><pre class="src">&nbsp; stats[i].reset();</pre></td></tr>
<tr> <td class="numLine">&nbsp;485</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;486</td> <td class="nbHitsCovered">&nbsp;7</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> duration = snapshotDurationMs;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;487</td> <td class="nbHitsCovered">&nbsp;7</td> <td class="src"><pre class="src">&nbsp; pendingStatPeriodEnd = ((currentTime / duration) * duration) + duration;</pre></td></tr>
<tr> <td class="numLine">&nbsp;488</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;489</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">// Walk through time to get the current Stat object</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;490</td> <td class="nbHitsCovered"><a title="Line 490: Conditional coverage 100% (2/2).">&nbsp;203</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 490: Conditional coverage 100% (2/2)."> <span class="keyword">while</span> (pendingStatPeriodEnd &lt;= currentTime) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;491</td> <td class="nbHitsCovered">&nbsp;188</td> <td class="src"><pre class="src">&nbsp; currentStat++;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;492</td> <td class="nbHitsCovered">&nbsp;188</td> <td class="src"><pre class="src">&nbsp; currentStat %= stats.length;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;493</td> <td class="nbHitsCovered">&nbsp;188</td> <td class="src"><pre class="src">&nbsp; stats[currentStat].reset();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;494</td> <td class="nbHitsCovered">&nbsp;188</td> <td class="src"><pre class="src">&nbsp; pendingStatPeriodEnd += snapshotDurationMs;</pre></td></tr>
<tr> <td class="numLine">&nbsp;495</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;496</td> <td class="nbHitsCovered">&nbsp;15</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> stats[currentStat];</pre></td></tr>
<tr> <td class="numLine">&nbsp;497</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;498</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;499</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">public</span> Stats clone() {</pre></td></tr>
<tr> <td class="numLine">&nbsp;500</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; Stats statsClone;</pre></td></tr>
<tr> <td class="numLine">&nbsp;501</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">try</span> {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;502</td> <td class="nbHitsCovered">&nbsp;72</td> <td class="src"><pre class="src">&nbsp; statsClone = (Stats) <span class="keyword">super</span>.clone();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;503</td> <td class="nbHitsUncovered">&nbsp;0</td> <td class="src"><pre class="src"><span class="srcUncovered">&nbsp; } <span class="keyword">catch</span> (CloneNotSupportedException ex) {</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;504</td> <td class="nbHitsUncovered">&nbsp;0</td> <td class="src"><pre class="src"><span class="srcUncovered">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> AssertionError();</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;505</td> <td class="nbHitsCovered">&nbsp;72</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;506</td> <td class="nbHitsCovered">&nbsp;72</td> <td class="src"><pre class="src">&nbsp; statsClone.stats = <span class="keyword">new</span> Stat[stats.length];</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;507</td> <td class="nbHitsCovered"><a title="Line 507: Conditional coverage 100% (2/2).">&nbsp;4104</a></td> <td class="src"><pre class="src">&nbsp;<a title="Line 507: Conditional coverage 100% (2/2)."> <span class="keyword">for</span> (<span class="keyword">int</span> i = 0; i &lt; stats.length; i++) {</a></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;508</td> <td class="nbHitsCovered">&nbsp;4032</td> <td class="src"><pre class="src">&nbsp; statsClone.stats[i] = stats[i].clone();</pre></td></tr>
<tr> <td class="numLine">&nbsp;509</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;510</td> <td class="nbHitsCovered">&nbsp;72</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> statsClone;</pre></td></tr>
<tr> <td class="numLine">&nbsp;511</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;512</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;513</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;514</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;515</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Structure for holding statistics data. Data applies to a time period only,</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;516</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * as controlled by {@link Stats}.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;517</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;518</td> <td class="nbHitsCovered">&nbsp;584</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">static</span> <span class="keyword">class</span> Stat <span class="keyword">implements</span> Cloneable {</pre></td></tr>
<tr> <td class="numLine">&nbsp;519</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;520</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * The number of requests processed.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;521</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;522</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> requestProcessingsCount;</pre></td></tr>
<tr> <td class="numLine">&nbsp;523</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;524</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * The number of request processings that errored.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;525</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;526</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> requestProcessingsFailureCount;</pre></td></tr>
<tr> <td class="numLine">&nbsp;527</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;528</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * The total duration of response processings.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;529</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;530</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> requestProcessingsDurationSum;</pre></td></tr>
<tr> <td class="numLine">&nbsp;531</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;532</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * The maximal duration of any one response processing.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;533</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;534</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> requestProcessingsMaxDuration;</pre></td></tr>
<tr> <td class="numLine">&nbsp;535</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;536</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Number of bytes generated by the adaptor.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;537</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;538</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">long</span> requestProcessingsThroughput;</pre></td></tr>
<tr> <td class="numLine">&nbsp;539</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;540</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * True if the GSA requested a document.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;541</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;542</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">boolean</span> gsaRetrievedDocument;</pre></td></tr>
<tr> <td class="numLine">&nbsp;543</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;544</td> <td class="nbHitsCovered">&nbsp;35450</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">public</span> Stat() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;545</td> <td class="nbHitsCovered">&nbsp;35450</td> <td class="src"><pre class="src">&nbsp; reset();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;546</td> <td class="nbHitsCovered">&nbsp;35450</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;547</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;548</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="comment">/**</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;549</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> * Reset object for reuse.</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;550</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;<span class="comment"> */</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;551</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">void</span> reset() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;552</td> <td class="nbHitsCovered">&nbsp;36034</td> <td class="src"><pre class="src">&nbsp; requestProcessingsCount = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;553</td> <td class="nbHitsCovered">&nbsp;36034</td> <td class="src"><pre class="src">&nbsp; requestProcessingsFailureCount = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;554</td> <td class="nbHitsCovered">&nbsp;36034</td> <td class="src"><pre class="src">&nbsp; requestProcessingsDurationSum = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;555</td> <td class="nbHitsCovered">&nbsp;36034</td> <td class="src"><pre class="src">&nbsp; requestProcessingsMaxDuration = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;556</td> <td class="nbHitsCovered">&nbsp;36034</td> <td class="src"><pre class="src">&nbsp; requestProcessingsThroughput = 0;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;557</td> <td class="nbHitsCovered">&nbsp;36034</td> <td class="src"><pre class="src">&nbsp; gsaRetrievedDocument = <span class="keyword">false</span>;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;558</td> <td class="nbHitsCovered">&nbsp;36034</td> <td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;559</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLine">&nbsp;560</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">public</span> Stat clone() {</pre></td></tr>
<tr> <td class="numLine">&nbsp;561</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">try</span> {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;562</td> <td class="nbHitsCovered">&nbsp;4032</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> (Stat) <span class="keyword">super</span>.clone();</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;563</td> <td class="nbHitsUncovered">&nbsp;0</td> <td class="src"><pre class="src"><span class="srcUncovered">&nbsp; } <span class="keyword">catch</span> (CloneNotSupportedException ex) {</span></pre></td></tr>
<tr> <td class="numLineCover">&nbsp;564</td> <td class="nbHitsUncovered">&nbsp;0</td> <td class="src"><pre class="src"><span class="srcUncovered">&nbsp; <span class="keyword">throw</span> <span class="keyword">new</span> AssertionError();</span></pre></td></tr>
<tr> <td class="numLine">&nbsp;565</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;566</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;567</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;568</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;569</td> <td class="nbHitsCovered">&nbsp;270</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">private</span> <span class="keyword">static</span> <span class="keyword">class</span> NegSizeFakeMap&lt;K, V&gt; <span class="keyword">extends</span> FakeMap&lt;K, V&gt; {</pre></td></tr>
<tr> <td class="numLine">&nbsp;570</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; @Override</pre></td></tr>
<tr> <td class="numLine">&nbsp;571</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; <span class="keyword">public</span> <span class="keyword">int</span> size() {</pre></td></tr>
<tr> <td class="numLineCover">&nbsp;572</td> <td class="nbHitsCovered">&nbsp;3</td> <td class="src"><pre class="src">&nbsp; <span class="keyword">return</span> -1;</pre></td></tr>
<tr> <td class="numLine">&nbsp;573</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;574</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp; }</pre></td></tr>
<tr> <td class="numLine">&nbsp;575</td> <td class="nbHits">&nbsp;</td>
<td class="src"><pre class="src">&nbsp;}</pre></td></tr>
</table>
<div class="footer">Report generated by <a href="http://cobertura.sourceforge.net/" target="_top">Cobertura</a> 1.9.4.1.</div>
</body>
</html>