public class QueryProfilerJMX extends AbstractCounter
| Modifier and Type | Field and Description |
|---|---|
private static CentralLogger |
LOG
Logger
|
protected java.util.function.ObjLongConsumer<java.lang.String> |
publishCacheHits
Publisher for the number of cache hits
|
protected java.util.function.ObjLongConsumer<java.lang.String> |
publishCacheMisses
Publisher for the number of cache misses
|
protected java.util.function.ObjLongConsumer<java.lang.String> |
publishHydrateTotalTime
Publisher for the total time spent in hydrate
|
protected java.util.function.ObjLongConsumer<java.lang.String> |
publishRowsCount
Publisher for the number of rows extracted from result sets
|
enabled, enabler| Modifier | Constructor and Description |
|---|---|
protected |
QueryProfilerJMX(java.util.function.ObjLongConsumer<java.lang.String> publishRowsCount,
java.util.function.ObjLongConsumer<java.lang.String> publishCacheHits,
java.util.function.ObjLongConsumer<java.lang.String> publishCacheMisses,
java.util.function.ObjLongConsumer<java.lang.String> publishHydrateTotalTime)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static QueryProfilerJMX |
getInstance(OptionalQueryProfiler profiler)
Create and register instance
|
void |
hydrateTotalTimer(java.sql.ResultSet rs,
Operation code)
Update the total time spent in hydrate
|
void |
updateCacheHits(java.sql.ResultSet rs,
long value)
Update the number of cache hits
|
void |
updateCacheMisses(java.sql.ResultSet rs,
long value)
Update the number of cache misses
|
void |
updateRowsCount(java.sql.ResultSet rs,
long value)
Update the number of rows extracted from result sets
|
getEnabler, isEnabled, setEnabled, setEnablerprivate static final CentralLogger LOG
protected final java.util.function.ObjLongConsumer<java.lang.String> publishRowsCount
protected final java.util.function.ObjLongConsumer<java.lang.String> publishCacheHits
protected final java.util.function.ObjLongConsumer<java.lang.String> publishCacheMisses
protected final java.util.function.ObjLongConsumer<java.lang.String> publishHydrateTotalTime
protected QueryProfilerJMX(java.util.function.ObjLongConsumer<java.lang.String> publishRowsCount,
java.util.function.ObjLongConsumer<java.lang.String> publishCacheHits,
java.util.function.ObjLongConsumer<java.lang.String> publishCacheMisses,
java.util.function.ObjLongConsumer<java.lang.String> publishHydrateTotalTime)
publishRowsCount - Publisher for the number of rows extracted from result setspublishCacheHits - Publisher for the number of cache hitspublishCacheMisses - Publisher for the number of cache missespublishHydrateTotalTime - Publisher for the total time spent in hydratepublic static QueryProfilerJMX getInstance(OptionalQueryProfiler profiler)
profiler - Query Profiler MBeanQueryProfilerJMX instancepublic void updateRowsCount(java.sql.ResultSet rs,
long value)
rs - The result set used by the query. Avoid overhead for
extracting the statement unless the profiler is enabled.value - The value used for update.public void updateCacheHits(java.sql.ResultSet rs,
long value)
rs - The result set used by the query. Avoid overhead for
extracting the statement unless the profiler is enabled.value - The value used for update.public void updateCacheMisses(java.sql.ResultSet rs,
long value)
rs - The result set used by the query. Avoid overhead for
extracting the statement unless the profiler is enabled.value - The value used for update.public void hydrateTotalTimer(java.sql.ResultSet rs,
Operation code)
rs - The result set used by the query. Avoid overhead for
extracting the statement unless the profiler is enabled.code - The code responsible for hydrate.