Class StackTracker


  • public class StackTracker
    extends java.lang.Object
    This thread safe class allows you to record stacks in the code so that you can understand HOW something is being called. This is similar to Profiler except there is no threading concept. Instead it is focused on the stack traces only and can be accessed concurrently.
    • Constructor Summary

      Constructors 
      Constructor Description
      StackTracker()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<Pair<java.lang.StackTraceElement[],​java.lang.Long>> dumpStackCounts()
      Check how many unique stack traces have been recorded.
      void recordStack()
      Record the current stack into the internally monitored traces.
      void reset()
      Reset all stored data to allow a new capture.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StackTracker

        public StackTracker()
    • Method Detail

      • recordStack

        public void recordStack()
        Record the current stack into the internally monitored traces. The call into StackTracker wont be included in the resulting stack.
      • dumpStackCounts

        public java.util.List<Pair<java.lang.StackTraceElement[],​java.lang.Long>> dumpStackCounts()
        Check how many unique stack traces have been recorded.
        Returns:
        A list with all the stack traces, de-duplicated, with the counts they were witnessed.
      • reset

        public void reset()
        Reset all stored data to allow a new capture.