com.espertech.esper.metrics.codahale_metrics.metrics.core
Class VirtualMachineMetrics

java.lang.Object
  extended by com.espertech.esper.metrics.codahale_metrics.metrics.core.VirtualMachineMetrics

public class VirtualMachineMetrics
extends java.lang.Object

A collection of Java Virtual Machine metrics.


Nested Class Summary
static class VirtualMachineMetrics.BufferPoolStats
          The management interface for a buffer pool, for example a pool of direct or mapped buffers.
static class VirtualMachineMetrics.GarbageCollectorStats
          Per-GC statistics.
 
Method Summary
 int daemonThreadCount()
          Returns the number of live daemon threads.
 java.util.Set<java.lang.String> deadlockedThreads()
          Returns a set of strings describing deadlocked threads, if any are deadlocked.
 double fileDescriptorUsage()
          Returns the percentage of available file descriptors which are currently in use.
 java.util.Map<java.lang.String,VirtualMachineMetrics.GarbageCollectorStats> garbageCollectors()
          Returns a map of garbage collector names to garbage collector information.
 java.util.Map<java.lang.String,VirtualMachineMetrics.BufferPoolStats> getBufferPoolStats()
           
static VirtualMachineMetrics getInstance()
          The default instance of VirtualMachineMetrics.
 double heapCommitted()
          Returns the heap memory committed to the JVM.
 double heapInit()
          Returns the heap initial memory of the current JVM.
 double heapMax()
          Returns the heap memory currently used by the current JVM.
 double heapUsage()
          Returns the percentage of the JVM's heap which is being used.
 double heapUsed()
          Returns the heap memory currently used by the current JVM.
 java.util.Map<java.lang.String,java.lang.Double> memoryPoolUsage()
          Returns a map of memory pool names to the percentage of that pool which is being used.
 java.lang.String name()
          Returns the name of the currently-running jvm.
 double nonHeapUsage()
          Returns the percentage of the JVM's non-heap memory (e.g., direct buffers) which is being used.
 int threadCount()
          Returns the number of live threads (includes daemonThreadCount().
 void threadDump(java.io.OutputStream out)
          Dumps all of the threads' current information to an output stream.
 java.util.Map<java.lang.Thread.State,java.lang.Double> threadStatePercentages()
          Returns a map of thread states to the percentage of all threads which are in that state.
 double totalCommitted()
          Returns the total memory committed to the JVM.
 double totalInit()
          Returns the total initial memory of the current JVM.
 double totalMax()
          Returns the total memory currently used by the current JVM.
 double totalUsed()
          Returns the total memory currently used by the current JVM.
 long uptime()
          Returns the number of seconds the JVM process has been running.
 java.lang.String version()
          Returns the version of the currently-running jvm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static VirtualMachineMetrics getInstance()
The default instance of VirtualMachineMetrics.

Returns:
the default instance

totalInit

public double totalInit()
Returns the total initial memory of the current JVM.

Returns:
total Heap and non-heap initial JVM memory in bytes.

totalUsed

public double totalUsed()
Returns the total memory currently used by the current JVM.

Returns:
total Heap and non-heap memory currently used by JVM in bytes.

totalMax

public double totalMax()
Returns the total memory currently used by the current JVM.

Returns:
total Heap and non-heap memory currently used by JVM in bytes.

totalCommitted

public double totalCommitted()
Returns the total memory committed to the JVM.

Returns:
total Heap and non-heap memory currently committed to the JVM in bytes.

heapInit

public double heapInit()
Returns the heap initial memory of the current JVM.

Returns:
Heap initial JVM memory in bytes.

heapUsed

public double heapUsed()
Returns the heap memory currently used by the current JVM.

Returns:
Heap memory currently used by JVM in bytes.

heapMax

public double heapMax()
Returns the heap memory currently used by the current JVM.

Returns:
Heap memory currently used by JVM in bytes.

heapCommitted

public double heapCommitted()
Returns the heap memory committed to the JVM.

Returns:
Heap memory currently committed to the JVM in bytes.

heapUsage

public double heapUsage()
Returns the percentage of the JVM's heap which is being used.

Returns:
the percentage of the JVM's heap which is being used

nonHeapUsage

public double nonHeapUsage()
Returns the percentage of the JVM's non-heap memory (e.g., direct buffers) which is being used.

Returns:
the percentage of the JVM's non-heap memory which is being used

memoryPoolUsage

public java.util.Map<java.lang.String,java.lang.Double> memoryPoolUsage()
Returns a map of memory pool names to the percentage of that pool which is being used.

Returns:
a map of memory pool names to the percentage of that pool which is being used

fileDescriptorUsage

public double fileDescriptorUsage()
Returns the percentage of available file descriptors which are currently in use.

Returns:
the percentage of available file descriptors which are currently in use, or NaN if the running JVM does not have access to this information

version

public java.lang.String version()
Returns the version of the currently-running jvm.

Returns:
the version of the currently-running jvm, eg "1.6.0_24"
See Also:
J2SE SDK/JRE Version String Naming Convention

name

public java.lang.String name()
Returns the name of the currently-running jvm.

Returns:
the name of the currently-running jvm, eg "Java HotSpot(TM) Client VM"
See Also:
System.getProperties()

uptime

public long uptime()
Returns the number of seconds the JVM process has been running.

Returns:
the number of seconds the JVM process has been running

threadCount

public int threadCount()
Returns the number of live threads (includes daemonThreadCount().

Returns:
the number of live threads

daemonThreadCount

public int daemonThreadCount()
Returns the number of live daemon threads.

Returns:
the number of live daemon threads

garbageCollectors

public java.util.Map<java.lang.String,VirtualMachineMetrics.GarbageCollectorStats> garbageCollectors()
Returns a map of garbage collector names to garbage collector information.

Returns:
a map of garbage collector names to garbage collector information

deadlockedThreads

public java.util.Set<java.lang.String> deadlockedThreads()
Returns a set of strings describing deadlocked threads, if any are deadlocked.

Returns:
a set of any deadlocked threads

threadStatePercentages

public java.util.Map<java.lang.Thread.State,java.lang.Double> threadStatePercentages()
Returns a map of thread states to the percentage of all threads which are in that state.

Returns:
a map of thread states to percentages

threadDump

public void threadDump(java.io.OutputStream out)
Dumps all of the threads' current information to an output stream.

Parameters:
out - an output stream

getBufferPoolStats

public java.util.Map<java.lang.String,VirtualMachineMetrics.BufferPoolStats> getBufferPoolStats()

© 2006-2016 EsperTech Inc.
All rights reserved.
Visit us at espertech.com