Package io.fluentlenium.core.performance
Interface PerformanceTiming
- All Known Implementing Classes:
DefaultPerformanceTiming
public interface PerformanceTiming
Interface representing the PerformanceTiming API defined by W3C under
Performance Timing interface.
From the browser they can be retrieved by querying the value of the following JavaScript attribute:
window.performance.timing.<attribute>.
To query the entire timing object in one Javascript query, you can call getMetrics() which returns
a PerformanceTimingMetrics object wrapping the timing metrics.
Though the default implementation in FluentLenium returns relative values, this interface is flexible enough so that custom implementations may be created.
-
Method Summary
Modifier and TypeMethodDescriptiondefault longReturns the value that corresponds to theconnectEndevent.default longconnectEnd(TimeUnit timeUnit) Returns the value that corresponds to theconnectEndevent, converted to the given time unit.default longReturns the value that corresponds to theconnectStartevent.default longconnectStart(TimeUnit timeUnit) Returns the value that corresponds to theconnectStartevent, converted to the given time unit.default longReturns the value that corresponds to thedomainLookupEndevent.default longdomainLookupEnd(TimeUnit timeUnit) Returns the value that corresponds to thedomainLookupEndevent, converted to the given time unit.default longReturns the value that corresponds to thedomainLookupStartevent.default longdomainLookupStart(TimeUnit timeUnit) Returns the value that corresponds to thedomainLookupStartevent, converted to the given time unit.default longReturns the value that corresponds to thedomCompleteevent.default longdomComplete(TimeUnit timeUnit) Returns the value that corresponds to thedomCompleteevent, converted to the given time unit.default longReturns the value that corresponds to thedomContentLoadedEventEndevent.default longdomContentLoadedEventEnd(TimeUnit timeUnit) Returns the value that corresponds to thedomContentLoadedEventEndevent, converted to the given time unit.default longReturns the value that corresponds to thedomContentLoadedEventStartevent.default longdomContentLoadedEventStart(TimeUnit timeUnit) Returns the value that corresponds to thedomContentLoadedEventStartevent, converted to the given time unit.default longReturns the value that corresponds to thedomInteractiveevent.default longdomInteractive(TimeUnit timeUnit) Returns the value that corresponds to thedomInteractiveevent, converted to the given time unit.default longReturns the value that corresponds to thedomLoadingevent.default longdomLoading(TimeUnit timeUnit) Returns the value that corresponds to thedomLoadingevent, converted to the given time unit.default longReturns the value that corresponds to thefetchStartevent.default longfetchStart(TimeUnit timeUnit) Returns the value that corresponds to thefetchStartevent, converted to the given time unit.longReturns the value for the argument event type.default longgetEventValue(PerformanceTimingEvent event, TimeUnit timeUnit) Returns the value for the argument event type converted to the given time unit.Return all timing metrics, in particular thewindow.performance.timingobject wrapped in aPerformanceTimingMetricsobject.default longReturns the value that corresponds to theloadEventEndevent.default longloadEventEnd(TimeUnit timeUnit) Returns the value that corresponds to theloadEventEndevent, converted to the given time unit.default longReturns the value that corresponds to theloadEventStartevent.default longloadEventStart(TimeUnit timeUnit) Returns the value that corresponds to theloadEventStartevent, converted to the given time unit.default longReturns the value that corresponds to thenavigationStartevent.default longnavigationStart(TimeUnit timeUnit) Returns the value that corresponds to thenavigationStartevent, converted to the given time unit.default longReturns the value that corresponds to theredirectEndevent.default longredirectEnd(TimeUnit timeUnit) Returns the value that corresponds to theredirectEndevent, converted to the given time unit.default longReturns the value that corresponds to theredirectStartevent.default longredirectStart(TimeUnit timeUnit) Returns the value that corresponds to theredirectStartevent, converted to the given time unit.default longReturns the value that corresponds to therequestStartevent.default longrequestStart(TimeUnit timeUnit) Returns the value that corresponds to therequestStartevent, converted to the given time unit.default longReturns the value that corresponds to theresponseEndevent.default longresponseEnd(TimeUnit timeUnit) Returns the value that corresponds to theresponseEndevent, converted to the given time unit.default longReturns the value that corresponds to theresponseStartevent.default longresponseStart(TimeUnit timeUnit) Returns the value that corresponds to theresponseStartevent, converted to the given time unit.default ObjectReturns the value that corresponds to thesecureConnectionStartevent.default ObjectsecureConnectionStart(TimeUnit timeUnit) Returns the value that corresponds to thesecureConnectionStartevent, converted to the given time unit.default longReturns the value that corresponds to theunloadEventEndevent.default longunloadEventEnd(TimeUnit timeUnit) Returns the value that corresponds to theunloadEventEndevent, converted to the given time unit.default longReturns the value that corresponds to theunloadEventStartevent.default longunloadEventStart(TimeUnit timeUnit) Returns the value that corresponds to theunloadEventStartevent, converted to the given time unit.
-
Method Details
-
unloadEventStart
default long unloadEventStart()Returns the value that corresponds to theunloadEventStartevent.- Returns:
- the epoch time for the
unloadEventStartevent
-
unloadEventStart
Returns the value that corresponds to theunloadEventStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
unloadEventStartevent
-
unloadEventEnd
default long unloadEventEnd()Returns the value that corresponds to theunloadEventEndevent.- Returns:
- the epoch time for the
unloadEventEndevent
-
unloadEventEnd
Returns the value that corresponds to theunloadEventEndevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
unloadEventEndevent
-
redirectStart
default long redirectStart()Returns the value that corresponds to theredirectStartevent.- Returns:
- the epoch time for the
redirectStartevent
-
redirectStart
Returns the value that corresponds to theredirectStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
redirectStartevent
-
redirectEnd
default long redirectEnd()Returns the value that corresponds to theredirectEndevent.- Returns:
- the epoch time for the
redirectEndevent
-
redirectEnd
Returns the value that corresponds to theredirectEndevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
redirectEndevent
-
fetchStart
default long fetchStart()Returns the value that corresponds to thefetchStartevent.- Returns:
- the epoch time for the
fetchStartevent
-
fetchStart
Returns the value that corresponds to thefetchStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
fetchStartevent
-
domainLookupStart
default long domainLookupStart()Returns the value that corresponds to thedomainLookupStartevent.- Returns:
- the epoch time for the
domainLookupStartevent
-
domainLookupStart
Returns the value that corresponds to thedomainLookupStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
domainLookupStartevent
-
domainLookupEnd
default long domainLookupEnd()Returns the value that corresponds to thedomainLookupEndevent.- Returns:
- the epoch time for the
domainLookupEndevent
-
domainLookupEnd
Returns the value that corresponds to thedomainLookupEndevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
domainLookupEndevent
-
connectStart
default long connectStart()Returns the value that corresponds to theconnectStartevent.- Returns:
- the epoch time for the
connectStartevent
-
connectStart
Returns the value that corresponds to theconnectStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
connectStartevent
-
connectEnd
default long connectEnd()Returns the value that corresponds to theconnectEndevent.- Returns:
- the epoch time for the
connectEndevent
-
connectEnd
Returns the value that corresponds to theconnectEndevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
connectEndevent
-
secureConnectionStart
Returns the value that corresponds to thesecureConnectionStartevent.- Returns:
- the epoch time for the
secureConnectionStartevent
-
secureConnectionStart
Returns the value that corresponds to thesecureConnectionStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
secureConnectionStartevent
-
requestStart
default long requestStart()Returns the value that corresponds to therequestStartevent.- Returns:
- the epoch time for the
requestStartevent
-
requestStart
Returns the value that corresponds to therequestStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
requestStartevent
-
responseStart
default long responseStart()Returns the value that corresponds to theresponseStartevent.- Returns:
- the epoch time for the
responseStartevent
-
responseStart
Returns the value that corresponds to theresponseStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
responseStartevent
-
responseEnd
default long responseEnd()Returns the value that corresponds to theresponseEndevent.- Returns:
- the epoch time for the
responseEndevent
-
responseEnd
Returns the value that corresponds to theresponseEndevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
responseEndevent
-
domLoading
default long domLoading()Returns the value that corresponds to thedomLoadingevent.- Returns:
- the epoch time for the
domLoadingevent
-
domLoading
Returns the value that corresponds to thedomLoadingevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
domLoadingevent
-
domInteractive
default long domInteractive()Returns the value that corresponds to thedomInteractiveevent.- Returns:
- the epoch time for the
domInteractiveevent
-
domInteractive
Returns the value that corresponds to thedomInteractiveevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
domInteractiveevent
-
domContentLoadedEventStart
default long domContentLoadedEventStart()Returns the value that corresponds to thedomContentLoadedEventStartevent.- Returns:
- the epoch time for the
domContentLoadedEventStartevent
-
domContentLoadedEventStart
Returns the value that corresponds to thedomContentLoadedEventStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
domContentLoadedEventStartevent
-
domContentLoadedEventEnd
default long domContentLoadedEventEnd()Returns the value that corresponds to thedomContentLoadedEventEndevent.- Returns:
- the epoch time for the
domContentLoadedEventEndevent
-
domContentLoadedEventEnd
Returns the value that corresponds to thedomContentLoadedEventEndevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
domContentLoadedEventEndevent
-
domComplete
default long domComplete()Returns the value that corresponds to thedomCompleteevent.- Returns:
- the epoch time for the
domCompleteevent
-
domComplete
Returns the value that corresponds to thedomCompleteevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
domCompleteevent
-
loadEventStart
default long loadEventStart()Returns the value that corresponds to theloadEventStartevent.- Returns:
- the epoch time for the
loadEventStartevent
-
loadEventStart
Returns the value that corresponds to theloadEventStartevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
loadEventStartevent
-
loadEventEnd
default long loadEventEnd()Returns the value that corresponds to theloadEventEndevent.- Returns:
- the epoch time for the
loadEventEndevent
-
loadEventEnd
Returns the value that corresponds to theloadEventEndevent, converted to the given time unit.- Parameters:
timeUnit- the time unit to convert the metrics values to- Returns:
- the converted time for the
loadEventEndevent
-
getEventValue
Returns the value for the argument event type.- Parameters:
event- the event, never null- Returns:
- the event value
-
getEventValue
Returns the value for the argument event type converted to the given time unit.- Parameters:
event- the event, never nulltimeUnit- the time unit to convert the value to- Returns:
- the event value in the given time unit
-
getMetrics
PerformanceTimingMetrics getMetrics()Return all timing metrics, in particular thewindow.performance.timingobject wrapped in aPerformanceTimingMetricsobject.- Returns:
- the performance timing metrics