public class DefaultVirtualMachineStatistics extends Object implements VirtualMachineStatistics
Constructor and Description |
---|
DefaultVirtualMachineStatistics() |
DefaultVirtualMachineStatistics(JVMStatistics stats,
VirtualMachineStatistics previousStats,
VirtualMachineDetails details,
int historySize,
long timeDelta) |
Modifier and Type | Method and Description |
---|---|
long |
getAdminTimestamp()
Returns a timestamp that is in sync with where the admin API is running.
|
double |
getCpuPerc()
Returns the cpu percentage this virtual machine is using.
|
double |
getCpuPercAverage(long requestedTotalTime,
TimeUnit timeUnit)
Calculates the average number of cpu cores used by the java virtual machine over the
specified period of time.
|
String |
getCpuPercFormatted() |
VirtualMachineDetails |
getDetails()
Returns the details of the virtual machine.
|
long |
getGcCollectionCount()
Returns the total number of times GC was invoked for this virtual machine
|
double |
getGcCollectionPerc()
The percentage of the gc collection time between the current sampled statistics and the
previous one.
|
long |
getGcCollectionTime()
Returns the total time in milliseconds that this virtual machine spent doing GC
|
long |
getMemoryHeapCommittedInBytes() |
double |
getMemoryHeapCommittedInGB() |
double |
getMemoryHeapCommittedInMB() |
double |
getMemoryHeapCommittedUsedPerc()
Returns the memory heap percentage from used to committed.
|
long |
getMemoryHeapUsedInBytes() |
double |
getMemoryHeapUsedInGB() |
double |
getMemoryHeapUsedInMB() |
double |
getMemoryHeapUsedPerc()
Returns the memory heap percentage from used to the max.
|
long |
getMemoryNonHeapCommittedInBytes() |
double |
getMemoryNonHeapCommittedInGB() |
double |
getMemoryNonHeapCommittedInMB() |
double |
getMemoryNonHeapCommittedUsedPerc()
Returns the memory non heap percentage from used to committed.
|
long |
getMemoryNonHeapUsedInBytes() |
double |
getMemoryNonHeapUsedInGB() |
double |
getMemoryNonHeapUsedInMB() |
double |
getMemoryNonHeapUsedPerc()
Returns the memory non heap percentage from used to the max.
|
int |
getPeakThreadCount()
Returns the maximum number of of threads that were running in the VM since it has started
|
VirtualMachineStatistics |
getPrevious()
Returns the previous statistics sampled.
|
long |
getPreviousTimestamp()
Returns the previous timestamp of the statistics sampled,
-1 if this is the
first one. |
int |
getThreadCount()
Returns the number of currently running threads in this virtual machine
|
List<VirtualMachineStatistics> |
getTimeline()
Returns the timeline (from newest to oldest) history statistics, including this one.
|
long |
getTimestamp()
Return the timestamp when the statistics were taken.
|
long |
getUptime() |
boolean |
isNA()
Returns
true if this is not valid statistics. |
void |
setPreviousStats(VirtualMachineStatistics previousStats) |
public DefaultVirtualMachineStatistics()
public DefaultVirtualMachineStatistics(JVMStatistics stats, VirtualMachineStatistics previousStats, VirtualMachineDetails details, int historySize, long timeDelta)
public boolean isNA()
VirtualMachineStatistics
true
if this is not valid statistics.isNA
in interface VirtualMachineStatistics
public long getTimestamp()
VirtualMachineStatistics
getTimestamp
in interface VirtualMachineStatistics
public long getAdminTimestamp()
VirtualMachineStatistics
getAdminTimestamp
in interface VirtualMachineStatistics
public VirtualMachineDetails getDetails()
VirtualMachineStatistics
getDetails
in interface VirtualMachineStatistics
public List<VirtualMachineStatistics> getTimeline()
VirtualMachineStatistics
getTimeline
in interface VirtualMachineStatistics
public VirtualMachineStatistics getPrevious()
VirtualMachineStatistics
null
if this is the first one or
bounded by the history size.getPrevious
in interface VirtualMachineStatistics
public void setPreviousStats(VirtualMachineStatistics previousStats)
public long getPreviousTimestamp()
VirtualMachineStatistics
-1
if this is the
first one.getPreviousTimestamp
in interface VirtualMachineStatistics
public long getUptime()
getUptime
in interface VirtualMachineStatistics
public long getMemoryHeapCommittedInBytes()
getMemoryHeapCommittedInBytes
in interface VirtualMachineStatistics
public double getMemoryHeapCommittedInMB()
getMemoryHeapCommittedInMB
in interface VirtualMachineStatistics
public double getMemoryHeapCommittedInGB()
getMemoryHeapCommittedInGB
in interface VirtualMachineStatistics
public long getMemoryHeapUsedInBytes()
getMemoryHeapUsedInBytes
in interface VirtualMachineStatistics
public double getMemoryHeapUsedInMB()
getMemoryHeapUsedInMB
in interface VirtualMachineStatistics
public double getMemoryHeapUsedInGB()
getMemoryHeapUsedInGB
in interface VirtualMachineStatistics
public double getMemoryHeapUsedPerc()
VirtualMachineStatistics
getMemoryHeapUsedPerc
in interface VirtualMachineStatistics
public double getMemoryHeapCommittedUsedPerc()
VirtualMachineStatistics
getMemoryHeapCommittedUsedPerc
in interface VirtualMachineStatistics
public long getMemoryNonHeapCommittedInBytes()
getMemoryNonHeapCommittedInBytes
in interface VirtualMachineStatistics
public double getMemoryNonHeapCommittedInMB()
getMemoryNonHeapCommittedInMB
in interface VirtualMachineStatistics
public double getMemoryNonHeapCommittedInGB()
getMemoryNonHeapCommittedInGB
in interface VirtualMachineStatistics
public long getMemoryNonHeapUsedInBytes()
getMemoryNonHeapUsedInBytes
in interface VirtualMachineStatistics
public double getMemoryNonHeapUsedInMB()
getMemoryNonHeapUsedInMB
in interface VirtualMachineStatistics
public double getMemoryNonHeapUsedInGB()
getMemoryNonHeapUsedInGB
in interface VirtualMachineStatistics
public double getMemoryNonHeapUsedPerc()
VirtualMachineStatistics
getMemoryNonHeapUsedPerc
in interface VirtualMachineStatistics
public double getMemoryNonHeapCommittedUsedPerc()
VirtualMachineStatistics
getMemoryNonHeapCommittedUsedPerc
in interface VirtualMachineStatistics
public int getThreadCount()
VirtualMachineStatistics
getThreadCount
in interface VirtualMachineStatistics
public int getPeakThreadCount()
VirtualMachineStatistics
getPeakThreadCount
in interface VirtualMachineStatistics
public long getGcCollectionCount()
VirtualMachineStatistics
getGcCollectionCount
in interface VirtualMachineStatistics
public long getGcCollectionTime()
VirtualMachineStatistics
getGcCollectionTime
in interface VirtualMachineStatistics
public double getGcCollectionPerc()
VirtualMachineStatistics
getGcCollectionPerc
in interface VirtualMachineStatistics
public double getCpuPerc()
VirtualMachineStatistics
getCpuPerc
in interface VirtualMachineStatistics
public double getCpuPercAverage(long requestedTotalTime, TimeUnit timeUnit)
VirtualMachineStatistics
StatisticsMonitor.setStatisticsHistorySize(int)
or increase statistics interval
StatisticsMonitor.setStatisticsInterval(long, TimeUnit)
.getCpuPercAverage
in interface VirtualMachineStatistics
requestedTotalTime
- The period of time to average the cpu percentage starting with this
statisticstimeUnit
- Time units for totalTimepublic String getCpuPercFormatted()
getCpuPercFormatted
in interface VirtualMachineStatistics
Copyright © GigaSpaces.