sk.baka.webvm.analyzer.hostos
Class Cpu

java.lang.Object
  extended by sk.baka.webvm.analyzer.hostos.Cpu

public final class Cpu
extends Object

Provides a CPU measurement support.

Author:
Martin Vysny

Method Summary
static boolean isHostCpuSupported()
          Checks if Host OS CPU usage measurement is supported.
static boolean isHostIOCpuSupported()
          Checks if measurer for Host OS CPU IO usage (% of time spent waiting for IO) is supported.
static boolean isJavaCpuSupported()
          Checks if measurer for CPU used by the owner java process is supported.
static CpuUsage newHostCpu()
          Creates a new measurer for Host OS CPU usage.
static CpuUsage newHostIOCpu()
          Creates a new measurer for Host OS CPU IO usage (% of time spent waiting for IO).
static CpuUsage newJavaCpu()
          Creates a new measurer for CPU used by the owner java process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newHostCpu

public static CpuUsage newHostCpu()
Creates a new measurer for Host OS CPU usage.

Returns:
the CPU measurer, never null.

isHostCpuSupported

public static boolean isHostCpuSupported()
Checks if Host OS CPU usage measurement is supported.

Returns:
true if supported.

newHostIOCpu

public static CpuUsage newHostIOCpu()
Creates a new measurer for Host OS CPU IO usage (% of time spent waiting for IO).

Returns:
the CPU measurer, never null.

isHostIOCpuSupported

public static boolean isHostIOCpuSupported()
Checks if measurer for Host OS CPU IO usage (% of time spent waiting for IO) is supported.

Returns:
true if supported.

newJavaCpu

public static CpuUsage newJavaCpu()
Creates a new measurer for CPU used by the owner java process.

Returns:
the CPU measurer, never null.

isJavaCpuSupported

public static boolean isJavaCpuSupported()
Checks if measurer for CPU used by the owner java process is supported.

Returns:
true if supported.


Copyright © 2010 Baka. All Rights Reserved.