Class RootCoverage

java.lang.Object
com.oracle.truffle.tools.coverage.RootCoverage

public final class RootCoverage extends Object
Coverage data of a particular root. Coverage data is organized per SourceSection contained in this root.
Since:
19.3.0
  • Method Details

    • getSectionCoverage

      public SectionCoverage[] getSectionCoverage()
      Returns:
      Coverage data for each SourceSection in this root
      Since:
      19.3.0
    • isCovered

      public boolean isCovered()
      Returns:
      Was this root covered (i.e. executed) during the tracking execution.
      Since:
      19.3.0
    • getSourceSection

      public com.oracle.truffle.api.source.SourceSection getSourceSection()
      Returns:
      The source section this coverage relates to.
      Since:
      19.3.0
    • getName

      public String getName()
      Returns:
      The name of the root (e.g. function/method name).
      Since:
      19.3.0
    • getCount

      public long getCount()
      This value is only available if the tracker config specified to count executions.
      Returns:
      How many times was the corresponding root executed. -1 if counting was disabled.
      Since:
      19.3.0