Class QueryMonitor


  • public class QueryMonitor
    extends java.lang.Object

    Purpose: Provide a very simple low overhead means for measuring query executions, and cache hits. This can be useful for performance analysis in a complex system. This monitor is enabled through the System property "org.eclipse.persistence.querymonitor=true" or through the persistence.xml property eclipselink.profiler=QueryMonitor. It dumps the number of query cache hits, and executions (misses) once every 100s.

    Author:
    James Sutherland
    Since:
    TopLink 10.1.3
    • Field Detail

      • cacheHits

        public static final java.util.Map<java.lang.String,​java.lang.Number> cacheHits
      • cacheMisses

        public static final java.util.Map<java.lang.String,​java.lang.Number> cacheMisses
      • dumpTime

        public static long dumpTime
      • shouldMonitor

        public static java.lang.Boolean shouldMonitor
    • Constructor Detail

      • QueryMonitor

        public QueryMonitor()
    • Method Detail

      • shouldMonitor

        public static boolean shouldMonitor()
      • checkDumpTime

        public static void checkDumpTime()
      • incrementReadObjectHits

        public static void incrementReadObjectHits​(ReadObjectQuery query)
      • incrementReadObjectMisses

        public static void incrementReadObjectMisses​(ReadObjectQuery query)
      • incrementReadAllHits

        public static void incrementReadAllHits​(ReadAllQuery query)
      • incrementReadAllMisses

        public static void incrementReadAllMisses​(ReadAllQuery query)
      • incrementInsert

        public static void incrementInsert​(WriteObjectQuery query)
      • incrementUpdate

        public static void incrementUpdate​(WriteObjectQuery query)