Class SlowLog

java.lang.Object
org.apache.lucene.monitor.SlowLog
All Implemented Interfaces:
Iterable<SlowLog.Entry>

public class SlowLog extends Object implements Iterable<SlowLog.Entry>
Reports on slow queries in a given match run
  • Field Details

  • Constructor Details

    • SlowLog

      public SlowLog()
  • Method Details

    • addQuery

      void addQuery(String query, long time)
      Add a query and time taken to the slow log.

      The query will only be recorded if the time is above the configured limit

      Parameters:
      query - the query id
      time - the time taken by the query in ns
    • addAll

      void addAll(Iterable<SlowLog.Entry> queries)
      Add all entries to this slow log
      Parameters:
      queries - the entries to add
    • iterator

      public Iterator<SlowLog.Entry> iterator()
      Specified by:
      iterator in interface Iterable<SlowLog.Entry>
    • toString

      public String toString()
      Overrides:
      toString in class Object