Class CpuTimeCollector

java.lang.Object
org.jppf.execute.CpuTimeCollector

public class CpuTimeCollector extends Object
Author:
Laurent Cohen
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static boolean
    Determines whether the thread cpu time measurement is supported and enabled.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    computeExecutionInfo(long threadID)
    Computes the CPU time used by thread identified by threadID.
    static long
    getCpuTime(long threadId)
    Get the current cpu time for the thread identified by the specified id.
    static boolean
    Determines whether the thread cpu time measurement is supported and enabled.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • cpuTimeEnabled

      protected static boolean cpuTimeEnabled
      Determines whether the thread cpu time measurement is supported and enabled.
  • Constructor Details

    • CpuTimeCollector

      public CpuTimeCollector()
  • Method Details

    • computeExecutionInfo

      public static ExecutionInfo computeExecutionInfo(long threadID)
      Computes the CPU time used by thread identified by threadID.
      Parameters:
      threadID - the thread ID.
      Returns:
      a NodeExecutionInfo instance.
    • getCpuTime

      public static long getCpuTime(long threadId)
      Get the current cpu time for the thread identified by the specified id.
      Parameters:
      threadId - the id of the thread to the cpu time from.
      Returns:
      the cpu time as a long value.
    • isCpuTimeEnabled

      public static boolean isCpuTimeEnabled()
      Determines whether the thread cpu time measurement is supported and enabled.
      Returns:
      true is cpu time measurement is enabled, false otherwise.