Class PerformanceLogContext


  • public class PerformanceLogContext
    extends java.lang.Object
    Singleton that collects performance logs.
    Since:
    5.10
    • Field Detail

      • INSTANCE

        private static final PerformanceLogContext INSTANCE
        Singleton instance that stores the statistics.
      • eventRecords

        private static final java.lang.ThreadLocal<java.util.List<PerformanceLogRecord>> eventRecords
        List that stores events as performance logs.
    • Constructor Detail

      • PerformanceLogContext

        private PerformanceLogContext()
    • Method Detail

      • getInstance

        public static PerformanceLogContext getInstance()
        Get the instance of the context.
        Returns:
        instance of performance log context.
      • getEventRecords

        public java.util.List<PerformanceLogRecord> getEventRecords()
        Get the unmodifiable list of events as performance records.
        Returns:
        unmodifiable list of events as performance logs.
      • addEvent

        public void addEvent​(PerformanceLogRecord record)
        Adds a performance log record to the current list of events.
        Parameters:
        record - performance log record that is going to be added.
      • cleanEvents

        public void cleanEvents()
        Removes all of the existing records from the current list of events.