Module kivakit.core

Class ThreadSnapshot

java.lang.Object
com.telenav.kivakit.core.vm.ThreadSnapshot

public class ThreadSnapshot extends Object
Captures a snapshot of ThreadStatus for all running threads via the Java management API.
Author:
jonathanl (shibo)
See Also:
  • Constructor Details

    • ThreadSnapshot

      public ThreadSnapshot()
  • Method Details

    • capturedAt

      public Time capturedAt()
      Returns:
      The time at which this snapshot was captured
    • cpuTime

      public Duration cpuTime()
    • cpuTime

      public Duration cpuTime(Thread thread)
    • snapshot

      public List<ThreadStatus> snapshot()
      Returns:
      The status of all threads captured in the snapshot
    • totalCpuTime

      public Duration totalCpuTime()
      Returns:
      The total CPU time of all threads
    • update

      public ThreadSnapshot update()
      Returns:
      Updates this thread snapshot