Package io.webfolder.cdp.command
Interface Profiler
-
public interface Profiler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddisable()voidenable()List<ScriptCoverage>getBestEffortCoverage()Collect coverage data for the current isolate.voidsetSamplingInterval(Integer interval)Changes CPU profiler sampling interval.voidstart()voidstartPreciseCoverage()Enable precise code coverage.voidstartPreciseCoverage(Boolean callCount, Boolean detailed)Enable precise code coverage.voidstartTypeProfile()Enable type profile.Profilestop()voidstopPreciseCoverage()Disable precise code coverage.voidstopTypeProfile()Disable type profile.List<ScriptCoverage>takePreciseCoverage()Collect coverage data for the current isolate, and resets execution counters.List<ScriptTypeProfile>takeTypeProfile()Collect type profile.
-
-
-
Method Detail
-
disable
void disable()
-
enable
void enable()
-
getBestEffortCoverage
List<ScriptCoverage> getBestEffortCoverage()
Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.- Returns:
- Coverage data for the current isolate.
-
setSamplingInterval
void setSamplingInterval(Integer interval)
Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.- Parameters:
interval- New sampling interval in microseconds.
-
start
void start()
-
startPreciseCoverage
void startPreciseCoverage(Boolean callCount, Boolean detailed)
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.- Parameters:
callCount- Collect accurate call counts beyond simple 'covered' or 'not covered'.detailed- Collect block-based coverage.
-
startTypeProfile
void startTypeProfile()
Enable type profile.
-
stop
Profile stop()
-
stopPreciseCoverage
void stopPreciseCoverage()
Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
-
stopTypeProfile
void stopTypeProfile()
Disable type profile. Disabling releases type profile data collected so far.
-
takePreciseCoverage
List<ScriptCoverage> takePreciseCoverage()
Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.- Returns:
- Coverage data for the current isolate.
-
takeTypeProfile
List<ScriptTypeProfile> takeTypeProfile()
Collect type profile.- Returns:
- Type profile for all scripts since startTypeProfile() was turned on.
-
startPreciseCoverage
void startPreciseCoverage()
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.
-
-