public class SlowLog extends java.lang.Object implements java.lang.Iterable<SlowLog.Entry>
Modifier and Type | Class and Description |
---|---|
static class |
SlowLog.Entry
An individual entry in the slow log
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<SlowLog.Entry> |
slowQueries |
Constructor and Description |
---|
SlowLog() |
Modifier and Type | Method and 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() |
private final java.util.List<SlowLog.Entry> slowQueries
void addQuery(java.lang.String query, long time)
The query will only be recorded if the time is above the configured limit
query
- the query idtime
- the time taken by the query in nsvoid addAll(java.lang.Iterable<SlowLog.Entry> queries)
queries
- the entries to addpublic java.util.Iterator<SlowLog.Entry> iterator()
iterator
in interface java.lang.Iterable<SlowLog.Entry>
public java.lang.String toString()
toString
in class java.lang.Object