Package com.couchbase.client.core.env
Class Diagnostics
java.lang.Object
com.couchbase.client.core.env.Diagnostics
public class Diagnostics extends Object
Provides access to various metrics helpful for system diagnosis.
- Since:
- 1.0
- Author:
- Michael Nitschinger
-
Field Summary
Fields Modifier and Type Field Description static MemoryMXBean
MEM_BEAN
static OperatingSystemMXBean
OS_BEAN
static RuntimeMXBean
RUNTIME_BEAN
static ThreadMXBean
THREAD_BEAN
-
Constructor Summary
Constructors Constructor Description Diagnostics()
-
Method Summary
Modifier and Type Method Description static Map<String,Object>
collect()
Collects all available infos in one map.static String
collectAndFormat()
Collects all available infos and formats it in a better readable way.static void
gcInfo(Map<String,Object> infos)
Collects system information as delivered from theGarbageCollectorMXBean
.static void
memInfo(Map<String,Object> infos)
Collects system information as delivered from theMemoryMXBean
.static void
runtimeInfo(Map<String,Object> infos)
Collects system information as delivered from theRuntimeMXBean
.static void
systemInfo(Map<String,Object> infos)
Collects system information as delivered from theOperatingSystemMXBean
.static void
threadInfo(Map<String,Object> infos)
Collects system information as delivered from theThreadMXBean
.
-
Field Details
-
OS_BEAN
-
MEM_BEAN
-
RUNTIME_BEAN
-
THREAD_BEAN
-
-
Constructor Details
-
Diagnostics
public Diagnostics()
-
-
Method Details
-
systemInfo
Collects system information as delivered from theOperatingSystemMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
gcInfo
Collects system information as delivered from theGarbageCollectorMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
memInfo
Collects system information as delivered from theMemoryMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
runtimeInfo
Collects system information as delivered from theRuntimeMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
threadInfo
Collects system information as delivered from theThreadMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
collect
Collects all available infos in one map.- Returns:
- the map populated with the information.
-
collectAndFormat
Collects all available infos and formats it in a better readable way.- Returns:
- a formatted string of available information.
-