public class StoreLatencyPlugin extends DiagnosticsPlugin
DiagnosticsPlugin
that helps to detect if there are any performance issues with Stores/Loaders like e.g.
MapStore
. This is done by instrumenting these Stores/Loaders with latency tracking probes,
so that per Store/Loader all kinds of statistics like count, avg, mag, latency distribution etc is available.
One of the main purposes of this plugin is to make sure that e.g. a Database is the cause of slow performance. This
plugin is useful to be combined with SlowOperationPlugin
to get idea about where the threads are spending
their time.
If this plugin is not enabled, there is no performance hit since the Stores/Loaders don't get decorated.Modifier and Type | Class and Description |
---|---|
static interface |
StoreLatencyPlugin.LatencyProbe |
Modifier and Type | Field and Description |
---|---|
static HazelcastProperty |
PERIOD_SECONDS
The period in seconds this plugin runs.
|
static HazelcastProperty |
RESET_PERIOD_SECONDS
The period in second the statistics should be reset.
|
logger
Constructor and Description |
---|
StoreLatencyPlugin(ILogger logger,
HazelcastProperties properties) |
StoreLatencyPlugin(NodeEngineImpl nodeEngine) |
Modifier and Type | Method and Description |
---|---|
long |
count(String serviceName,
String dataStructureName,
String methodName) |
long |
getPeriodMillis()
Returns the period of executing the monitor in millis.
|
StoreLatencyPlugin.LatencyProbe |
newProbe(String serviceName,
String dataStructureName,
String methodName) |
void |
onStart() |
void |
run(DiagnosticsLogWriter writer) |
public static final HazelcastProperty PERIOD_SECONDS
public static final HazelcastProperty RESET_PERIOD_SECONDS
public StoreLatencyPlugin(NodeEngineImpl nodeEngine)
public StoreLatencyPlugin(ILogger logger, HazelcastProperties properties)
public long getPeriodMillis()
DiagnosticsPlugin
SystemPropertiesPlugin
that run at the beginning of a log file but their contents will not change.getPeriodMillis
in class DiagnosticsPlugin
public void onStart()
onStart
in class DiagnosticsPlugin
public void run(DiagnosticsLogWriter writer)
run
in class DiagnosticsPlugin
public StoreLatencyPlugin.LatencyProbe newProbe(String serviceName, String dataStructureName, String methodName)
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.