summaryrefslogtreecommitdiff
path: root/rep/ept/popcon/popcon.h.gcov.html
diff options
context:
space:
mode:
Diffstat (limited to 'rep/ept/popcon/popcon.h.gcov.html')
-rw-r--r--rep/ept/popcon/popcon.h.gcov.html220
1 files changed, 0 insertions, 220 deletions
diff --git a/rep/ept/popcon/popcon.h.gcov.html b/rep/ept/popcon/popcon.h.gcov.html
deleted file mode 100644
index 270736f..0000000
--- a/rep/ept/popcon/popcon.h.gcov.html
+++ /dev/null
@@ -1,220 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html lang="en">
-
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>LCOV - lcov.info - ept/popcon/popcon.h</title>
- <link rel="stylesheet" type="text/css" href="../../gcov.css">
-</head>
-
-<body>
-
- <table width="100%" border=0 cellspacing=0 cellpadding=0>
- <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
- <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
-
- <tr>
- <td width="100%">
- <table cellpadding=1 border=0 width="100%">
- <tr>
- <td class="headerItem" width="20%">Current&nbsp;view:</td>
- <td class="headerValue" width="80%" colspan=4><a href="../../index.html">directory</a> - <a href="index.html">ept/popcon</a> - popcon.h</td>
- </tr>
- <tr>
- <td class="headerItem" width="20%">Test:</td>
- <td class="headerValue" width="80%" colspan=4>lcov.info</td>
- </tr>
- <tr>
- <td class="headerItem" width="20%">Date:</td>
- <td class="headerValue" width="20%">2008-08-14</td>
- <td width="20%"></td>
- <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
- <td class="headerValue" width="20%">25</td>
- </tr>
- <tr>
- <td class="headerItem" width="20%">Code&nbsp;covered:</td>
- <td class="headerValue" width="20%">96.0 %</td>
- <td width="20%"></td>
- <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
- <td class="headerValue" width="20%">24</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
- </table>
-
- <table cellpadding=0 cellspacing=0 border=0>
- <tr>
- <td><br></td>
- </tr>
- <tr>
- <td><pre class="source">
-<span class="lineNum"> 1 </span> : // -*- mode: c++; tab-width: 4; indent-tabs-mode: t -*-
-<span class="lineNum"> 2 </span> : #ifndef EPT_POPCON_POPCON_H
-<span class="lineNum"> 3 </span> : #define EPT_POPCON_POPCON_H
-<span class="lineNum"> 4 </span> :
-<span class="lineNum"> 5 </span> : /** @file
-<span class="lineNum"> 6 </span> : * @author Enrico Zini &lt;enrico@enricozini.org&gt;
-<span class="lineNum"> 7 </span> : * Access popcon data
-<span class="lineNum"> 8 </span> : */
-<span class="lineNum"> 9 </span> :
-<span class="lineNum"> 10 </span> : /*
-<span class="lineNum"> 11 </span> : * Copyright (C) 2007 Enrico Zini &lt;enrico@debian.org&gt;
-<span class="lineNum"> 12 </span> : *
-<span class="lineNum"> 13 </span> : * This program is free software; you can redistribute it and/or modify
-<span class="lineNum"> 14 </span> : * it under the terms of the GNU General Public License as published by
-<span class="lineNum"> 15 </span> : * the Free Software Foundation; either version 2 of the License, or
-<span class="lineNum"> 16 </span> : * (at your option) any later version.
-<span class="lineNum"> 17 </span> : *
-<span class="lineNum"> 18 </span> : * This program is distributed in the hope that it will be useful,
-<span class="lineNum"> 19 </span> : * but WITHOUT ANY WARRANTY; without even the implied warranty of
-<span class="lineNum"> 20 </span> : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-<span class="lineNum"> 21 </span> : * GNU General Public License for more details.
-<span class="lineNum"> 22 </span> : *
-<span class="lineNum"> 23 </span> : * You should have received a copy of the GNU General Public License
-<span class="lineNum"> 24 </span> : * along with this program; if not, write to the Free Software
-<span class="lineNum"> 25 </span> : * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-<span class="lineNum"> 26 </span> : */
-<span class="lineNum"> 27 </span> :
-<span class="lineNum"> 28 </span> : #include &lt;tagcoll/diskindex/mmap.h&gt;
-<span class="lineNum"> 29 </span> : #include &lt;string&gt;
-<span class="lineNum"> 30 </span> :
-<span class="lineNum"> 31 </span> : namespace ept {
-<span class="lineNum"> 32 </span> : namespace apt {
-<span class="lineNum"> 33 </span> : class Apt;
-<span class="lineNum"> 34 </span> : }
-<span class="lineNum"> 35 </span> :
-<span class="lineNum"> 36 </span> : namespace popcon {
-<span class="lineNum"> 37 </span> :
-<span class="lineNum"> 38 </span> : /**
-<span class="lineNum"> 39 </span> : * Store the score information in the popcon cache.
-<span class="lineNum"> 40 </span> : *
-<span class="lineNum"> 41 </span> : * Currently, this is only one float; more can be added in the future.
-<span class="lineNum"> 42 </span> : */
-<span class="lineNum"> 43 </span> : class Score
-<span class="lineNum"> 44 </span> : {
-<span class="lineNum"> 45 </span> : protected:
-<span class="lineNum"> 46 </span> : unsigned offset;
-<span class="lineNum"> 47 </span> :
-<span class="lineNum"> 48 </span> : public:
-<span class="lineNum"> 49 </span> : float score;
-<span class="lineNum"> 50 </span> :
-<span class="lineNum"> 51 </span><span class="lineCov"> 69910 : Score(float score) : offset(offset), score(score) {}</span>
-<span class="lineNum"> 52 </span> :
-<span class="lineNum"> 53 </span> : friend class Popcon;
-<span class="lineNum"> 54 </span> : friend class PopconIndexer;
-<span class="lineNum"> 55 </span> : friend class PopconGenerator;
-<span class="lineNum"> 56 </span> : };
-<span class="lineNum"> 57 </span> :
-<span class="lineNum"> 58 </span> : /**
-<span class="lineNum"> 59 </span> : * Maps Packages to IDs and vice-versa.
-<span class="lineNum"> 60 </span> : *
-<span class="lineNum"> 61 </span> : * This is used in building the Debtags fast index, which works representing
-<span class="lineNum"> 62 </span> : * tags and packages as int IDs.
-<span class="lineNum"> 63 </span> : *
-<span class="lineNum"> 64 </span> : * Index building works like this:
-<span class="lineNum"> 65 </span> : * 1. The file all-popcon-results.txt.gz is downloaded from
-<span class="lineNum"> 66 </span> : * http://popcon.debian.org/all-popcon-results.txt.gz
-<span class="lineNum"> 67 </span> : * 2. The file is put in either ~/.popcon/all-popcon-results.txt.gz
-<span class="lineNum"> 68 </span> : * or in /var/lib/popcon/all-popcon-results.txt.gz
-<span class="lineNum"> 69 </span> : * 3. If the file is newer than the index, it will be automatically used to
-<span class="lineNum"> 70 </span> : * recompute the scores and rebuild the index.
-<span class="lineNum"> 71 </span> : */
-<span class="lineNum"> 72 </span> : class Popcon : public tagcoll::diskindex::MMap
-<span class="lineNum"> 73 </span><span class="lineCov"> 7 : {</span>
-<span class="lineNum"> 74 </span> : struct GeneralInfo : public tagcoll::diskindex::MMap
-<span class="lineNum"> 75 </span><span class="lineCov"> 7 : {</span>
-<span class="lineNum"> 76 </span> : size_t submissions() const;
-<span class="lineNum"> 77 </span> : };
-<span class="lineNum"> 78 </span> :
-<span class="lineNum"> 79 </span> : tagcoll::diskindex::MasterMMap mastermmap;
-<span class="lineNum"> 80 </span> : time_t m_timestamp;
-<span class="lineNum"> 81 </span> :
-<span class="lineNum"> 82 </span> : GeneralInfo m_info;
-<span class="lineNum"> 83 </span> :
-<span class="lineNum"> 84 </span> : /// Get the score structure by index
-<span class="lineNum"> 85 </span><span class="lineCov"> 102350 : const Score* structByIndex(size_t idx) const</span>
-<span class="lineNum"> 86 </span> : {
-<span class="lineNum"> 87 </span><span class="lineCov"> 102350 : if (idx &gt;= 0 &amp;&amp; idx &lt; size())</span>
-<span class="lineNum"> 88 </span><span class="lineCov"> 102350 : return (Score*)m_buf + idx;</span>
-<span class="lineNum"> 89 </span><span class="lineNoCov"> 0 : return 0;</span>
-<span class="lineNum"> 90 </span> : }
-<span class="lineNum"> 91 </span> :
-<span class="lineNum"> 92 </span> : public:
-<span class="lineNum"> 93 </span> : Popcon();
-<span class="lineNum"> 94 </span> :
-<span class="lineNum"> 95 </span> : /// Get the timestamp of when the index was last updated
-<span class="lineNum"> 96 </span><span class="lineCov"> 1 : time_t timestamp() const { return m_timestamp; }</span>
-<span class="lineNum"> 97 </span> :
-<span class="lineNum"> 98 </span> : /// Return true if this data source has data, false if it's empty
-<span class="lineNum"> 99 </span><span class="lineCov"> 1 : bool hasData() const { return m_timestamp != 0; }</span>
-<span class="lineNum"> 100 </span> :
-<span class="lineNum"> 101 </span> : /// Return the total number of popcon submissions
-<span class="lineNum"> 102 </span><span class="lineCov"> 3 : size_t submissions() const { return m_info.submissions(); }</span>
-<span class="lineNum"> 103 </span> :
-<span class="lineNum"> 104 </span> : /// Get the number of packages in the index
-<span class="lineNum"> 105 </span><span class="lineCov"> 174055 : size_t size() const</span>
-<span class="lineNum"> 106 </span> : {
-<span class="lineNum"> 107 </span><span class="lineCov"> 174055 : if (m_buf)</span>
-<span class="lineNum"> 108 </span><span class="lineCov"> 174053 : return ((Score*)m_buf)-&gt;offset / sizeof(Score);</span>
-<span class="lineNum"> 109 </span> : else
-<span class="lineNum"> 110 </span><span class="lineCov"> 2 : return 0;</span>
-<span class="lineNum"> 111 </span> : }
-<span class="lineNum"> 112 </span> :
-<span class="lineNum"> 113 </span> : /**
-<span class="lineNum"> 114 </span> : * Get a package name by index
-<span class="lineNum"> 115 </span> : *
-<span class="lineNum"> 116 </span> : * If the index is not valid, returns the empty string.
-<span class="lineNum"> 117 </span> : */
-<span class="lineNum"> 118 </span><span class="lineCov"> 30678 : std::string name(size_t idx) const</span>
-<span class="lineNum"> 119 </span> : {
-<span class="lineNum"> 120 </span><span class="lineCov"> 30678 : const Score* s = structByIndex(idx);</span>
-<span class="lineNum"> 121 </span><span class="lineCov"> 30678 : if (s == 0) return std::string();</span>
-<span class="lineNum"> 122 </span><span class="lineCov"> 30678 : return std::string(m_buf + s-&gt;offset);</span>
-<span class="lineNum"> 123 </span> : }
-<span class="lineNum"> 124 </span> :
-<span class="lineNum"> 125 </span> : /// Get the score by index
-<span class="lineNum"> 126 </span><span class="lineCov"> 71672 : float scoreByIndex(size_t idx) const</span>
-<span class="lineNum"> 127 </span> : {
-<span class="lineNum"> 128 </span><span class="lineCov"> 71672 : const Score* s = structByIndex(idx);</span>
-<span class="lineNum"> 129 </span><span class="lineCov"> 71672 : if (!s) return 0;</span>
-<span class="lineNum"> 130 </span><span class="lineCov"> 71672 : return s-&gt;score;</span>
-<span class="lineNum"> 131 </span> : }
-<span class="lineNum"> 132 </span> :
-<span class="lineNum"> 133 </span> : /// Get the score structure by package name
-<span class="lineNum"> 134 </span> : float scoreByName(const std::string&amp; name) const;
-<span class="lineNum"> 135 </span> :
-<span class="lineNum"> 136 </span> : /// Get the score by index
-<span class="lineNum"> 137 </span><span class="lineCov"> 71672 : float score(size_t idx) const { return scoreByIndex(idx); }</span>
-<span class="lineNum"> 138 </span> :
-<span class="lineNum"> 139 </span> : /// Get the score by index
-<span class="lineNum"> 140 </span> : float operator[](int idx) const { return scoreByIndex(idx); }
-<span class="lineNum"> 141 </span> :
-<span class="lineNum"> 142 </span> : /// Get the score by name
-<span class="lineNum"> 143 </span><span class="lineCov"> 1790 : float score(const std::string&amp; name) const { return scoreByName(name); }</span>
-<span class="lineNum"> 144 </span> :
-<span class="lineNum"> 145 </span> : /// Get the score structure by package name
-<span class="lineNum"> 146 </span><span class="lineCov"> 2 : float operator[](const std::string&amp; name) const { return scoreByName(name); }</span>
-<span class="lineNum"> 147 </span> : };
-<span class="lineNum"> 148 </span> :
-<span class="lineNum"> 149 </span> : }
-<span class="lineNum"> 150 </span> : }
-<span class="lineNum"> 151 </span> :
-<span class="lineNum"> 152 </span> : // vim:set ts=4 sw=4:
-<span class="lineNum"> 153 </span> : #endif
-</pre>
- </td>
- </tr>
- </table>
- <br>
-
- <table width="100%" border=0 cellspacing=0 cellpadding=0>
- <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
- <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
- </table>
- <br>
-
-</body>
-</html>