Class QueryMonitor
- java.lang.Object
-
- org.eclipse.persistence.tools.profiler.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 Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.Number>
cacheHits
static java.util.Map<java.lang.String,java.lang.Number>
cacheMisses
static long
dumpTime
static java.lang.Boolean
shouldMonitor
-
Constructor Summary
Constructors Constructor Description QueryMonitor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkDumpTime()
static void
incrementDelete(DeleteObjectQuery query)
static void
incrementInsert(WriteObjectQuery query)
static void
incrementReadAllHits(ReadAllQuery query)
static void
incrementReadAllMisses(ReadAllQuery query)
static void
incrementReadObjectHits(ReadObjectQuery query)
static void
incrementReadObjectMisses(ReadObjectQuery query)
static void
incrementUpdate(WriteObjectQuery query)
static boolean
shouldMonitor()
-
-
-
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)
-
incrementDelete
public static void incrementDelete(DeleteObjectQuery query)
-
-