Class SampleSummary.SampleMethod

java.lang.Object
redempt.redlib.dev.profiler.SampleSummary.SampleMethod
Enclosing class:
SampleSummary

public static class SampleSummary.SampleMethod extends Object
Represents a method and its specific place in the summary tree. Each SampleMethod can be treated as a node of a tree.
  • Field Details

  • Constructor Details

  • Method Details

    • getPrevalence

      public double getPrevalence()
      Returns:
      The percentage of samples this method was reported in - effectively, how much of the sample duration was spent running this method
    • getParent

      public SampleSummary.SampleMethod getParent()
      Returns:
      The SampleMethod which always called this method, or null if this is the root SampleMethod.
    • getChildren

      public Set<SampleSummary.SampleMethod> getChildren()
      Returns:
      The set of children of this SampleMethod - the methods it called
    • getName

      public String getName()
      Returns:
      The full name of this method
    • getDepth

      public int getDepth()
      Returns:
      The depth of this SampleMethod in the tree - its distance from the root
    • getShortName

      public String getShortName()
      Returns:
      The shortened method name, with package name and unneeded lambda data removed
    • addChild

      protected void addChild(SampleSummary.SampleMethod method)
    • increment

      protected void increment()
    • getCount

      public long getCount()
      Returns:
      The number of times this method appeared in samples - effectively, the number of milliseconds this method was being run for in total.
    • clone

      protected SampleSummary.SampleMethod clone(SampleSummary summary)