Package org.apache.lucene.monitor
Class SlowLog
- java.lang.Object
-
- org.apache.lucene.monitor.SlowLog
-
- All Implemented Interfaces:
java.lang.Iterable<SlowLog.Entry>
public class SlowLog extends java.lang.Object implements java.lang.Iterable<SlowLog.Entry>
Reports on slow queries in a given match run
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SlowLog.Entry
An individual entry in the slow log
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<SlowLog.Entry>
slowQueries
-
Constructor Summary
Constructors Constructor Description SlowLog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addAll(java.lang.Iterable<SlowLog.Entry> queries)
Add all entries to this slow log(package private) void
addQuery(java.lang.String query, long time)
Add a query and time taken to the slow log.java.util.Iterator<SlowLog.Entry>
iterator()
java.lang.String
toString()
-
-
-
Field Detail
-
slowQueries
private final java.util.List<SlowLog.Entry> slowQueries
-
-
Method Detail
-
addQuery
void addQuery(java.lang.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 idtime
- the time taken by the query in ns
-
addAll
void addAll(java.lang.Iterable<SlowLog.Entry> queries)
Add all entries to this slow log- Parameters:
queries
- the entries to add
-
iterator
public java.util.Iterator<SlowLog.Entry> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<SlowLog.Entry>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-