Class 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
    • 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • slowQueries

        private final java.util.List<SlowLog.Entry> slowQueries
    • Constructor Detail

      • SlowLog

        public SlowLog()
    • 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 id
        time - 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 interface java.lang.Iterable<SlowLog.Entry>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object