Class Profiler
- java.lang.Object
-
- org.openqa.selenium.devtools.profiler.Profiler
-
public class Profiler extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Profiler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Event<ConsoleProfileFinished>
consoleProfileFinished()
static Event<ConsoleProfileStarted>
consoleProfileStarted()
Sent when new profile recording is started using console.profile() call.static Command<java.lang.Void>
disable()
Disable Profilingstatic Command<java.lang.Void>
enable()
Enable Profilingstatic Command<java.util.List<ScriptCoverage>>
getBestEffortCoverage()
Collect coverage data for the current isolate.static Command<java.lang.Void>
setSamplingInterval(int interval)
Changes CPU profiler sampling interval.static Command<java.lang.Void>
start()
start Profiling processstatic Command<java.lang.Void>
startPreciseCoverage(java.util.Optional<java.lang.Boolean> callCount, java.util.Optional<java.lang.Boolean> detailed)
Enable precise code coverage.static Command<java.lang.Void>
startTypeProfile()
Enable type profilestatic Command<Profile>
stop()
stop Profiling processstatic Command<java.lang.Void>
stopPreciseCoverage()
Disable precise code coverage.static Command<java.lang.Void>
stopTypeProfile()
Disable type profile.static Command<java.util.List<ScriptCoverage>>
takePreciseCoverage()
Collect coverage data for the current isolate, and resets execution counters.static Command<java.util.List<ScriptCoverage>>
takeTypeProfile()
Collect type profile.EXPERIMENTAL
-
-
-
Method Detail
-
disable
public static Command<java.lang.Void> disable()
Disable Profiling
-
enable
public static Command<java.lang.Void> enable()
Enable Profiling
-
start
public static Command<java.lang.Void> start()
start Profiling process
-
getBestEffortCoverage
public static Command<java.util.List<ScriptCoverage>> getBestEffortCoverage()
Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
-
setSamplingInterval
public static Command<java.lang.Void> setSamplingInterval(int interval)
Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.- Parameters:
interval
- New sampling interval in microseconds.
-
startPreciseCoverage
public static Command<java.lang.Void> startPreciseCoverage(java.util.Optional<java.lang.Boolean> callCount, java.util.Optional<java.lang.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
@Beta public static Command<java.lang.Void> startTypeProfile()
Enable type profile
-
stopPreciseCoverage
public static Command<java.lang.Void> stopPreciseCoverage()
Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
-
stopTypeProfile
@Beta public static Command<java.lang.Void> stopTypeProfile()
Disable type profile. Disabling releases type profile data collected so far.EXPERIMENTAL
-
takePreciseCoverage
public static Command<java.util.List<ScriptCoverage>> takePreciseCoverage()
Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
-
takeTypeProfile
@Beta public static Command<java.util.List<ScriptCoverage>> takeTypeProfile()
Collect type profile.EXPERIMENTAL
-
consoleProfileFinished
public static Event<ConsoleProfileFinished> consoleProfileFinished()
-
consoleProfileStarted
public static Event<ConsoleProfileStarted> consoleProfileStarted()
Sent when new profile recording is started using console.profile() call.
-
-