Class StatisticsSearcher

java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.component.chain.ChainedComponent
com.yahoo.processing.Processor
com.yahoo.search.Searcher
com.yahoo.prelude.statistics.StatisticsSearcher
All Implemented Interfaces:
com.yahoo.component.Component, com.yahoo.component.Deconstructable, Comparable<com.yahoo.component.Component>

public class StatisticsSearcher extends Searcher

A searcher to gather statistics such as queries completed and query latency. There may be more than 1 StatisticsSearcher in the Searcher chain, each identified by a Searcher ID. The statistics accumulated by all StatisticsSearchers are stored in the singleton StatisticsManager object.

TODO: Fix events to handle more than one of these searchers properly.

Author:
Gene Meyers, Steinar Knutsen, bergum
  • Field Summary

    Fields inherited from class com.yahoo.component.AbstractComponent

    isDeconstructable
  • Constructor Summary

    Constructors
    Constructor
    Description
    StatisticsSearcher(com.yahoo.jdisc.Metric metric, com.yahoo.metrics.simple.MetricReceiver metricReceiver)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    search(Query query, Execution execution)
    Generate statistics for the query passing through this Searcher 1) Add 1 to total query count 2) Add response time to total response time (time from entry to return) 3) .....

    Methods inherited from class com.yahoo.search.Searcher

    ensureFilled, fill, getLogger, process, toString

    Methods inherited from class com.yahoo.component.chain.ChainedComponent

    getAnnotatedDependencies, getDefaultAnnotatedDependencies, getDependencies, initDependencies

    Methods inherited from class com.yahoo.component.AbstractComponent

    clone, compareTo, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable

    Methods inherited from class java.lang.Object

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

    • StatisticsSearcher

      public StatisticsSearcher(com.yahoo.jdisc.Metric metric, com.yahoo.metrics.simple.MetricReceiver metricReceiver)
  • Method Details

    • deconstruct

      public void deconstruct()
      Specified by:
      deconstruct in interface com.yahoo.component.Deconstructable
      Overrides:
      deconstruct in class com.yahoo.component.AbstractComponent
    • search

      public Result search(Query query, Execution execution)
      Generate statistics for the query passing through this Searcher 1) Add 1 to total query count 2) Add response time to total response time (time from entry to return) 3) .....
      Specified by:
      search in class Searcher
      Parameters:
      query - the query
      Returns:
      the result of making this query