com.sun.labs.minion
Class QueryStats

java.lang.Object
  extended by com.sun.labs.minion.QueryStats
All Implemented Interfaces:
java.io.Serializable

public class QueryStats
extends java.lang.Object
implements java.io.Serializable

A class to hold statistics generated during a single or many queries.

See Also:
Serialized Form

Field Summary
 int dictCacheHits
          The number of main dictionary cache hits during the query.
 int dictCacheMisses
          The number of main dictionary cache misses during the query.
 int dictLookups
          The number of main dictionary lookups done during the query.
 NanoWatch dictLookupW
          A stopwatch that accumulates the time required for dictionary lookups during the query.
 NanoWatch intersectW
          A stopwatch that accumulates the time required for intersecting postings during the query.
 NanoWatch normW
          A stopwatch that accumulates the time spent normalizing document scores.
 NanoWatch piW
          A stopwatch that accumulates the time spent iterating through postings, no matter what the reason.
 long postingsSize
          The total size (in bytes) of postings read during the query.
 NanoWatch postReadW
          A stopwatch that accumulates the time required for reading postings during the query.
 NanoWatch postSortW
          A stopwatch that accumulates the time spent sorting postings.
 NanoWatch queryW
          A stopwatch that accumulates the total query time.
 int termCacheHits
          The number of term cache hits.
 int termCacheMisses
          The number of term cache misses.
 NanoWatch termCacheW
          A stopwatch that accumulates the time spent getting entries for the term cache.
 NanoWatch unionW
          A stopwatch that accumulates the time required for unioning postings during the query.
 
Constructor Summary
QueryStats()
           
 
Method Summary
 void accumulate(QueryStats qs)
          Accumulates one set of query statistics into this one, so that we can gather stats across a number of queries.
 java.lang.String dump()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dictLookups

public int dictLookups
The number of main dictionary lookups done during the query.


dictCacheHits

public int dictCacheHits
The number of main dictionary cache hits during the query.


dictCacheMisses

public int dictCacheMisses
The number of main dictionary cache misses during the query.


termCacheHits

public int termCacheHits
The number of term cache hits.


termCacheMisses

public int termCacheMisses
The number of term cache misses.


postingsSize

public long postingsSize
The total size (in bytes) of postings read during the query.


queryW

public NanoWatch queryW
A stopwatch that accumulates the total query time.


dictLookupW

public NanoWatch dictLookupW
A stopwatch that accumulates the time required for dictionary lookups during the query.


termCacheW

public NanoWatch termCacheW
A stopwatch that accumulates the time spent getting entries for the term cache.


postReadW

public NanoWatch postReadW
A stopwatch that accumulates the time required for reading postings during the query.


unionW

public NanoWatch unionW
A stopwatch that accumulates the time required for unioning postings during the query. This will accumulate the time for single term queries.


intersectW

public NanoWatch intersectW
A stopwatch that accumulates the time required for intersecting postings during the query.


piW

public NanoWatch piW
A stopwatch that accumulates the time spent iterating through postings, no matter what the reason.


postSortW

public NanoWatch postSortW
A stopwatch that accumulates the time spent sorting postings.


normW

public NanoWatch normW
A stopwatch that accumulates the time spent normalizing document scores.

Constructor Detail

QueryStats

public QueryStats()
Method Detail

accumulate

public void accumulate(QueryStats qs)
Accumulates one set of query statistics into this one, so that we can gather stats across a number of queries.

Parameters:
qs - a set of query statistics to add to this one.

dump

public java.lang.String dump()