public class Diagnostics extends Object
Diagnostics
is a debugging tool that provides insight in all kinds of potential performance and stability issues.
The actual logic to provide such insights, is placed in the DiagnosticsPlugin
.Modifier and Type | Field and Description |
---|---|
static HazelcastProperty |
DIRECTORY
Configures the output directory of the performance log files.
|
static HazelcastProperty |
ENABLED
Use the
Diagnostics to see internal performance metrics and cluster related information. |
static HazelcastProperty |
HUMAN_FRIENDLY_FORMAT
Determines if a human friendly, but more difficult to parse, output format is selected for dumping the metrics.
|
static HazelcastProperty |
MAX_ROLLED_FILE_COUNT
The
DiagnosticsLogFile uses a rolling file approach to prevent eating too much disk space. |
static HazelcastProperty |
MAX_ROLLED_FILE_SIZE_MB
The
DiagnosticsLogFile uses a rolling file approach to prevent eating too much disk space. |
static HazelcastProperty |
METRICS_LEVEL
The minimum level for probes is MANDATORY, but it can be changed to INFO or DEBUG.
|
static String |
PREFIX |
Constructor and Description |
---|
Diagnostics(String fileName,
ILogger logger,
HazelcastThreadGroup hzThreadGroup,
HazelcastProperties properties) |
Modifier and Type | Method and Description |
---|---|
File |
currentFile() |
<P extends DiagnosticsPlugin> |
getPlugin(Class<P> pluginClass)
Gets the plugin for a given plugin class.
|
void |
register(DiagnosticsPlugin plugin)
Registers a
DiagnosticsPlugin . |
void |
shutdown() |
void |
start() |
public static final String PREFIX
public static final HazelcastProperty METRICS_LEVEL
public static final HazelcastProperty ENABLED
Diagnostics
to see internal performance metrics and cluster related information.
The performance monitor logs all metrics into the log file.
For more detailed information, please check the METRICS_LEVEL.
The default is false.public static final HazelcastProperty MAX_ROLLED_FILE_SIZE_MB
DiagnosticsLogFile
uses a rolling file approach to prevent eating too much disk space.
This property sets the maximum size in MB for a single file.
Every HazelcastInstance will get its own history of log files.
The default is 10.public static final HazelcastProperty MAX_ROLLED_FILE_COUNT
DiagnosticsLogFile
uses a rolling file approach to prevent eating too much disk space.
This property sets the maximum number of rolling files to keep on disk.
The default is 10.public static final HazelcastProperty HUMAN_FRIENDLY_FORMAT
public static final HazelcastProperty DIRECTORY
public Diagnostics(String fileName, ILogger logger, HazelcastThreadGroup hzThreadGroup, HazelcastProperties properties)
public File currentFile()
public <P extends DiagnosticsPlugin> P getPlugin(Class<P> pluginClass)
P
- pluginClass
- the class of the DiagnosticsPluginpublic void register(DiagnosticsPlugin plugin)
DiagnosticsPlugin
.
This method is threadsafe.
There is no checking for duplicate registration.
If the Diagnostics
is disabled, the call is ignored.plugin
- the plugin to registerNullPointerException
- if plugin is null.public void start()
public void shutdown()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.