Class ProfilerImpl

  • All Implemented Interfaces:
    Profiler

    public class ProfilerImpl
    extends java.lang.Object
    implements Profiler
    • Method Detail

      • disable

        public void disable()
        Specified by:
        disable in interface Profiler
      • enable

        public void enable()
        Specified by:
        enable in interface Profiler
      • getBestEffortCoverage

        public java.util.List<ScriptCoverage> getBestEffortCoverage()
        Description copied from interface: Profiler
        Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
        Specified by:
        getBestEffortCoverage in interface Profiler
        Returns:
        Coverage data for the current isolate.
      • setSamplingInterval

        public void setSamplingInterval​(java.lang.Integer interval)
        Description copied from interface: Profiler
        Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
        Specified by:
        setSamplingInterval in interface Profiler
        Parameters:
        interval - New sampling interval in microseconds.
      • start

        public void start()
        Specified by:
        start in interface Profiler
      • startPreciseCoverage

        public void startPreciseCoverage()
        Description copied from interface: Profiler
        Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
        Specified by:
        startPreciseCoverage in interface Profiler
      • startPreciseCoverage

        public void startPreciseCoverage​(java.lang.Boolean callCount,
                                         java.lang.Boolean detailed)
        Description copied from interface: Profiler
        Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
        Specified by:
        startPreciseCoverage in interface Profiler
        Parameters:
        callCount - Collect accurate call counts beyond simple 'covered' or 'not covered'.
        detailed - Collect block-based coverage.
      • startTypeProfile

        public void startTypeProfile()
        Description copied from interface: Profiler
        Enable type profile.
        Specified by:
        startTypeProfile in interface Profiler
      • stopPreciseCoverage

        public void stopPreciseCoverage()
        Description copied from interface: Profiler
        Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
        Specified by:
        stopPreciseCoverage in interface Profiler
      • stopTypeProfile

        public void stopTypeProfile()
        Description copied from interface: Profiler
        Disable type profile. Disabling releases type profile data collected so far.
        Specified by:
        stopTypeProfile in interface Profiler
      • takePreciseCoverage

        public java.util.List<ScriptCoverage> takePreciseCoverage()
        Description copied from interface: Profiler
        Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
        Specified by:
        takePreciseCoverage in interface Profiler
        Returns:
        Coverage data for the current isolate.
      • takeTypeProfile

        public java.util.List<ScriptTypeProfile> takeTypeProfile()
        Description copied from interface: Profiler
        Collect type profile.
        Specified by:
        takeTypeProfile in interface Profiler
        Returns:
        Type profile for all scripts since startTypeProfile() was turned on.