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
All Methods Static Methods Concrete Methods 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 Detail
-
OS_BEAN
public static final OperatingSystemMXBean OS_BEAN
-
MEM_BEAN
public static final MemoryMXBean MEM_BEAN
-
RUNTIME_BEAN
public static final RuntimeMXBean RUNTIME_BEAN
-
THREAD_BEAN
public static final ThreadMXBean THREAD_BEAN
-
-
Method Detail
-
systemInfo
@IgnoreJRERequirement public static void systemInfo(Map<String,Object> infos)
Collects system information as delivered from theOperatingSystemMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
gcInfo
public static void gcInfo(Map<String,Object> infos)
Collects system information as delivered from theGarbageCollectorMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
memInfo
public static void memInfo(Map<String,Object> infos)
Collects system information as delivered from theMemoryMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
runtimeInfo
public static void runtimeInfo(Map<String,Object> infos)
Collects system information as delivered from theRuntimeMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
threadInfo
public static void threadInfo(Map<String,Object> infos)
Collects system information as delivered from theThreadMXBean
.- Parameters:
infos
- a map where the infos are passed in.
-
collect
public static Map<String,Object> collect()
Collects all available infos in one map.- Returns:
- the map populated with the information.
-
collectAndFormat
public static String collectAndFormat()
Collects all available infos and formats it in a better readable way.- Returns:
- a formatted string of available information.
-
-