statisticstracker.html

来自「网络爬虫开源代码」· HTML 代码 · 共 1,011 行 · 第 1/5 页

HTML
1,011
字号
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getBytesPerFileType(java.lang.String)">getBytesPerFileType</A></B>(java.lang.String&nbsp;filetype)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the accumulated number of bytes from files of a given file type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getBytesPerHost(java.lang.String)">getBytesPerHost</A></B>(java.lang.String&nbsp;host)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the accumulated number of bytes downloaded from a given host.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Hashtable&lt;java.lang.String,<A HREF="../../../../org/archive/util/LongWrapper.html" title="class in org.archive.util">LongWrapper</A>&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getFileDistribution()">getFileDistribution</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a HashMap that contains information about distributions of  encountered mime types.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getHostLastFinished(java.lang.String)">getHostLastFinished</A></B>(java.lang.String&nbsp;host)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the time (in millisec) when a URI belonging to a given host was last finished processing.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Map&lt;java.lang.String,java.lang.Number&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getProgressStatistics()">getProgressStatistics</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getProgressStatisticsLine()">getProgressStatisticsLine</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return one line of current progress-statistics</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getProgressStatisticsLine(java.util.Date)">getProgressStatisticsLine</A></B>(java.util.Date&nbsp;now)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return one line of current progress-statistics</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.TreeMap&lt;java.lang.String,<A HREF="../../../../org/archive/util/LongWrapper.html" title="class in org.archive.util">LongWrapper</A>&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getReverseSortedCopy(java.util.Map)">getReverseSortedCopy</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../org/archive/util/LongWrapper.html" title="class in org.archive.util">LongWrapper</A>&gt;&nbsp;mapOfLongWrapperValues)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sort the entries of the given HashMap in descending order by their values, which must be longs wrapped with <code>LongWrapper</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.SortedMap</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getReverseSortedHostCounts(java.util.Map)">getReverseSortedHostCounts</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../org/archive/util/LongWrapper.html" title="class in org.archive.util">LongWrapper</A>&gt;&nbsp;hostCounts)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a copy of the hosts distribution in reverse-sorted (largest first) order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.SortedMap</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getReverseSortedHostsDistribution()">getReverseSortedHostsDistribution</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a copy of the hosts distribution in reverse-sorted (largest first) order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Iterator</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getSeedRecordsSortedByStatusCode()">getSeedRecordsSortedByStatusCode</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a SeedRecord iterator for the job being monitored.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;java.util.Iterator&lt;<A HREF="../../../../org/archive/crawler/admin/SeedRecord.html" title="class in org.archive.crawler.admin">SeedRecord</A>&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getSeedRecordsSortedByStatusCode(java.util.Iterator)">getSeedRecordsSortedByStatusCode</A></B>(java.util.Iterator&lt;java.lang.String&gt;&nbsp;i)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Iterator&lt;java.lang.String&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getSeeds()">getSeeds</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a seed iterator for the job being monitored.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Hashtable&lt;java.lang.String,<A HREF="../../../../org/archive/util/LongWrapper.html" title="class in org.archive.util">LongWrapper</A>&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#getStatusCodeDistribution()">getStatusCodeDistribution</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a HashMap representing the distribution of status codes for successfully fetched curis, as represented by a hashmap where key -&gt; val represents (string)code -&gt; (integer)count.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#incrementMapCount(java.util.Map, java.lang.String)">incrementMapCount</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../org/archive/util/LongWrapper.html" title="class in org.archive.util">LongWrapper</A>&gt;&nbsp;map,                  java.lang.String&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Increment a counter for a key in a given HashMap.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#incrementMapCount(java.util.Map, java.lang.String, long)">incrementMapCount</A></B>(java.util.Map&lt;java.lang.String,<A HREF="../../../../org/archive/util/LongWrapper.html" title="class in org.archive.util">LongWrapper</A>&gt;&nbsp;map,                  java.lang.String&nbsp;key,                  long&nbsp;increment)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Increment a counter for a key in a given HashMap by an arbitrary amount.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#initialize(org.archive.crawler.framework.CrawlController)">initialize</A></B>(<A HREF="../../../../org/archive/crawler/framework/CrawlController.html" title="class in org.archive.crawler.framework">CrawlController</A>&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets up the Logger (including logInterval) and registers with the CrawlController for CrawlStatus and CrawlURIDisposition events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#percentOfDiscoveredUrisCompleted()">percentOfDiscoveredUrisCompleted</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This returns the number of completed URIs as a percentage of the total number of URIs encountered (should be inverse to the discovery curve)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#processedDocsPerSec()">processedDocsPerSec</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of documents that have been processed per second over the life of the crawl (as of last snapshot)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#processedKBPerSec()">processedKBPerSec</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculates the rate that data, in kb, has been processed over the life of the crawl (as of last snapshot.)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#progressStatisticsEvent(java.util.EventObject)">progressStatisticsEvent</A></B>(java.util.EventObject&nbsp;e)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A method for logging current crawler state.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#queuedUriCount()">queuedUriCount</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of URIs <i>queued</i> up and waiting for processing.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/archive/crawler/admin/StatisticsTracker.html#saveHostStats(java.lang.String, long)">saveHostStats</A></B>(java.lang.String&nbsp;hostname,              long&nbsp;size)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?