java.lang.Runnable
public final class StatsThread
extends java.lang.Object
implements java.lang.Runnable
ProgressLogger
instances keeping track of a number of
quantities of interest related to the Distributor
, e.g.,
requests, transferred byets, etc.Modifier and Type | Field | Description |
---|---|---|
long |
brokenPathQueryCount |
The number of path+queries living in a broken visit state.
|
long |
brokenVisitStatesOnWorkbench |
The number of broken visit states on the workbench.
|
int[] |
dist |
A variable used for exponentially-binned distribution of visit state sizes.
|
SummaryStats |
entrySummaryStats |
A variable accumulating statistics about the size (in visit states) of workbench entries.
|
ProgressLogger |
receivedURLsLogger |
A global progress logger, counting the URLs received from other agents.
|
ProgressLogger |
requestLogger |
A global progress logger, measuring the number of completed requests.
|
long |
resolvedVisitStates |
The number of resolved visit states.
|
ProgressLogger |
resourceLogger |
A global progress logger, measuring the number of non-duplicate resources actually stored.
|
ProgressLogger |
transferredBytesLogger |
A global progress logger, measuring the number of transferred bytes.
|
long |
unresolved |
The number of path+queries living in an unresolved visit state.
|
Constructor | Description |
---|---|
StatsThread(Frontier frontier,
Distributor distributor) |
Creates the thread.
|
Modifier and Type | Method | Description |
---|---|---|
void |
done() |
Terminates the statistics, closing all the progress loggers.
|
void |
emit() |
Emits the statistics.
|
int |
getVisitStates() |
Returns the overall number of visit states.
|
long |
getVisitStatesOnDisk() |
Returns the number of visit states on disk.
|
void |
run() |
|
void |
start(long previousCrawlDuration) |
Starst all progress loggers.
|
static java.lang.String |
toString(int[] a) |
Returns an integer array as a string, but does not print trailing zeroes.
|
static java.lang.String |
toString(java.util.concurrent.atomic.AtomicLongArray a) |
Returns an
AtomicLongArray array as a string, but does not print trailing zeroes. |
public final ProgressLogger requestLogger
public final ProgressLogger resourceLogger
public final ProgressLogger transferredBytesLogger
public final ProgressLogger receivedURLsLogger
public volatile int[] dist
public volatile long unresolved
public volatile long brokenPathQueryCount
public volatile SummaryStats entrySummaryStats
public volatile long resolvedVisitStates
public volatile long brokenVisitStatesOnWorkbench
public StatsThread(Frontier frontier, Distributor distributor)
frontier
- the frontier instantiating the thread.distributor
- the distributor used.public void start(long previousCrawlDuration)
previousCrawlDuration
- the duration of the previous crawl, or zero for a new crawl.public static java.lang.String toString(int[] a)
a
- an array.Object.toString()
of a
, but without trailing zeroes.public static java.lang.String toString(java.util.concurrent.atomic.AtomicLongArray a)
AtomicLongArray
array as a string, but does not print trailing zeroes.a
- an atomic array.Arrays.toString(long[])
of a
, but without trailing zeroes.public void emit()
public void run()
run
in interface java.lang.Runnable
public long getVisitStatesOnDisk()
public int getVisitStates()
public void done()