Class Timing

java.lang.Object
com.yahoo.container.handler.Timing

public class Timing extends Object

A wrapper for timing of events in the course of a query evaluation. Advanced database searches and similar could use these structures as well.

Not adding this object will lead to less exact entries in the query log. It is legal to set only queryStartTime and set the other values to zero.

If you do not understand the fields, just avoid creating this object in you handler.

Author:
Steinar Knutsen
  • Constructor Summary

    Constructors
    Constructor
    Description
    Timing(long summaryStartTime, long ignored, long queryStartTime, long timeout)
    Do consider using com.yahoo.search.handler.SearchResponse.createTiming(Query, Result) if instead of this constructor if you are creating a Timing instance in a search context.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    This is the start of the server's evaluation of a query or request, after full reception of it through the network.
    long
    Summary start time is when the fetching of hit/document contents start.
    long
    This is the timeout that was given to this query.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Timing

      public Timing(long summaryStartTime, long ignored, long queryStartTime, long timeout)
      Do consider using com.yahoo.search.handler.SearchResponse.createTiming(Query, Result) if instead of this constructor if you are creating a Timing instance in a search context.
      Parameters:
      summaryStartTime - when fetching of document contents started
      queryStartTime - when the request started
      timeout - maximum allowed lifetime of the request
  • Method Details

    • getSummaryStartTime

      public long getSummaryStartTime()
      Summary start time is when the fetching of hit/document contents start. (As opposed to just analyzing hit relevancies.)
      Returns:
      the start time of summary fetching or 0
    • getQueryStartTime

      public long getQueryStartTime()
      This is the start of the server's evaluation of a query or request, after full reception of it through the network. It will usually be intialized implicitly from the value generated by the com.yahoo.search.Query constructor.
      Returns:
      the starting time of query construction
    • getTimeout

      public long getTimeout()
      This is the timeout that was given to this query.
      Returns:
      The timeout given allowed to the query.