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 aPerformanceTimingMetrics
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default long
connectEnd()
Returns the value that corresponds to theconnectEnd
event.default long
connectEnd(TimeUnit timeUnit)
Returns the value that corresponds to theconnectEnd
event, converted to the given time unit.default long
connectStart()
Returns the value that corresponds to theconnectStart
event.default long
connectStart(TimeUnit timeUnit)
Returns the value that corresponds to theconnectStart
event, converted to the given time unit.default long
domainLookupEnd()
Returns the value that corresponds to thedomainLookupEnd
event.default long
domainLookupEnd(TimeUnit timeUnit)
Returns the value that corresponds to thedomainLookupEnd
event, converted to the given time unit.default long
domainLookupStart()
Returns the value that corresponds to thedomainLookupStart
event.default long
domainLookupStart(TimeUnit timeUnit)
Returns the value that corresponds to thedomainLookupStart
event, converted to the given time unit.default long
domComplete()
Returns the value that corresponds to thedomComplete
event.default long
domComplete(TimeUnit timeUnit)
Returns the value that corresponds to thedomComplete
event, converted to the given time unit.default long
domContentLoadedEventEnd()
Returns the value that corresponds to thedomContentLoadedEventEnd
event.default long
domContentLoadedEventEnd(TimeUnit timeUnit)
Returns the value that corresponds to thedomContentLoadedEventEnd
event, converted to the given time unit.default long
domContentLoadedEventStart()
Returns the value that corresponds to thedomContentLoadedEventStart
event.default long
domContentLoadedEventStart(TimeUnit timeUnit)
Returns the value that corresponds to thedomContentLoadedEventStart
event, converted to the given time unit.default long
domInteractive()
Returns the value that corresponds to thedomInteractive
event.default long
domInteractive(TimeUnit timeUnit)
Returns the value that corresponds to thedomInteractive
event, converted to the given time unit.default long
domLoading()
Returns the value that corresponds to thedomLoading
event.default long
domLoading(TimeUnit timeUnit)
Returns the value that corresponds to thedomLoading
event, converted to the given time unit.default long
fetchStart()
Returns the value that corresponds to thefetchStart
event.default long
fetchStart(TimeUnit timeUnit)
Returns the value that corresponds to thefetchStart
event, converted to the given time unit.long
getEventValue(PerformanceTimingEvent event)
Returns the value for the argument event type.default long
getEventValue(PerformanceTimingEvent event, TimeUnit timeUnit)
Returns the value for the argument event type converted to the given time unit.PerformanceTimingMetrics
getMetrics()
Return all timing metrics, in particular thewindow.performance.timing
object wrapped in aPerformanceTimingMetrics
object.default long
loadEventEnd()
Returns the value that corresponds to theloadEventEnd
event.default long
loadEventEnd(TimeUnit timeUnit)
Returns the value that corresponds to theloadEventEnd
event, converted to the given time unit.default long
loadEventStart()
Returns the value that corresponds to theloadEventStart
event.default long
loadEventStart(TimeUnit timeUnit)
Returns the value that corresponds to theloadEventStart
event, converted to the given time unit.default long
navigationStart()
Returns the value that corresponds to thenavigationStart
event.default long
navigationStart(TimeUnit timeUnit)
Returns the value that corresponds to thenavigationStart
event, converted to the given time unit.default long
redirectEnd()
Returns the value that corresponds to theredirectEnd
event.default long
redirectEnd(TimeUnit timeUnit)
Returns the value that corresponds to theredirectEnd
event, converted to the given time unit.default long
redirectStart()
Returns the value that corresponds to theredirectStart
event.default long
redirectStart(TimeUnit timeUnit)
Returns the value that corresponds to theredirectStart
event, converted to the given time unit.default long
requestStart()
Returns the value that corresponds to therequestStart
event.default long
requestStart(TimeUnit timeUnit)
Returns the value that corresponds to therequestStart
event, converted to the given time unit.default long
responseEnd()
Returns the value that corresponds to theresponseEnd
event.default long
responseEnd(TimeUnit timeUnit)
Returns the value that corresponds to theresponseEnd
event, converted to the given time unit.default long
responseStart()
Returns the value that corresponds to theresponseStart
event.default long
responseStart(TimeUnit timeUnit)
Returns the value that corresponds to theresponseStart
event, converted to the given time unit.default Object
secureConnectionStart()
Returns the value that corresponds to thesecureConnectionStart
event.default Object
secureConnectionStart(TimeUnit timeUnit)
Returns the value that corresponds to thesecureConnectionStart
event, converted to the given time unit.default long
unloadEventEnd()
Returns the value that corresponds to theunloadEventEnd
event.default long
unloadEventEnd(TimeUnit timeUnit)
Returns the value that corresponds to theunloadEventEnd
event, converted to the given time unit.default long
unloadEventStart()
Returns the value that corresponds to theunloadEventStart
event.default long
unloadEventStart(TimeUnit timeUnit)
Returns the value that corresponds to theunloadEventStart
event, converted to the given time unit.
-
-
-
Method Detail
-
navigationStart
default long navigationStart()
Returns the value that corresponds to thenavigationStart
event.- Returns:
- the epoch time for the
navigationStart
event
-
navigationStart
default long navigationStart(TimeUnit timeUnit)
Returns the value that corresponds to thenavigationStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
navigationStart
event
-
unloadEventStart
default long unloadEventStart()
Returns the value that corresponds to theunloadEventStart
event.- Returns:
- the epoch time for the
unloadEventStart
event
-
unloadEventStart
default long unloadEventStart(TimeUnit timeUnit)
Returns the value that corresponds to theunloadEventStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
unloadEventStart
event
-
unloadEventEnd
default long unloadEventEnd()
Returns the value that corresponds to theunloadEventEnd
event.- Returns:
- the epoch time for the
unloadEventEnd
event
-
unloadEventEnd
default long unloadEventEnd(TimeUnit timeUnit)
Returns the value that corresponds to theunloadEventEnd
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
unloadEventEnd
event
-
redirectStart
default long redirectStart()
Returns the value that corresponds to theredirectStart
event.- Returns:
- the epoch time for the
redirectStart
event
-
redirectStart
default long redirectStart(TimeUnit timeUnit)
Returns the value that corresponds to theredirectStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
redirectStart
event
-
redirectEnd
default long redirectEnd()
Returns the value that corresponds to theredirectEnd
event.- Returns:
- the epoch time for the
redirectEnd
event
-
redirectEnd
default long redirectEnd(TimeUnit timeUnit)
Returns the value that corresponds to theredirectEnd
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
redirectEnd
event
-
fetchStart
default long fetchStart()
Returns the value that corresponds to thefetchStart
event.- Returns:
- the epoch time for the
fetchStart
event
-
fetchStart
default long fetchStart(TimeUnit timeUnit)
Returns the value that corresponds to thefetchStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
fetchStart
event
-
domainLookupStart
default long domainLookupStart()
Returns the value that corresponds to thedomainLookupStart
event.- Returns:
- the epoch time for the
domainLookupStart
event
-
domainLookupStart
default long domainLookupStart(TimeUnit timeUnit)
Returns the value that corresponds to thedomainLookupStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
domainLookupStart
event
-
domainLookupEnd
default long domainLookupEnd()
Returns the value that corresponds to thedomainLookupEnd
event.- Returns:
- the epoch time for the
domainLookupEnd
event
-
domainLookupEnd
default long domainLookupEnd(TimeUnit timeUnit)
Returns the value that corresponds to thedomainLookupEnd
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
domainLookupEnd
event
-
connectStart
default long connectStart()
Returns the value that corresponds to theconnectStart
event.- Returns:
- the epoch time for the
connectStart
event
-
connectStart
default long connectStart(TimeUnit timeUnit)
Returns the value that corresponds to theconnectStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
connectStart
event
-
connectEnd
default long connectEnd()
Returns the value that corresponds to theconnectEnd
event.- Returns:
- the epoch time for the
connectEnd
event
-
connectEnd
default long connectEnd(TimeUnit timeUnit)
Returns the value that corresponds to theconnectEnd
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
connectEnd
event
-
secureConnectionStart
default Object secureConnectionStart()
Returns the value that corresponds to thesecureConnectionStart
event.- Returns:
- the epoch time for the
secureConnectionStart
event
-
secureConnectionStart
default Object secureConnectionStart(TimeUnit timeUnit)
Returns the value that corresponds to thesecureConnectionStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
secureConnectionStart
event
-
requestStart
default long requestStart()
Returns the value that corresponds to therequestStart
event.- Returns:
- the epoch time for the
requestStart
event
-
requestStart
default long requestStart(TimeUnit timeUnit)
Returns the value that corresponds to therequestStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
requestStart
event
-
responseStart
default long responseStart()
Returns the value that corresponds to theresponseStart
event.- Returns:
- the epoch time for the
responseStart
event
-
responseStart
default long responseStart(TimeUnit timeUnit)
Returns the value that corresponds to theresponseStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
responseStart
event
-
responseEnd
default long responseEnd()
Returns the value that corresponds to theresponseEnd
event.- Returns:
- the epoch time for the
responseEnd
event
-
responseEnd
default long responseEnd(TimeUnit timeUnit)
Returns the value that corresponds to theresponseEnd
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
responseEnd
event
-
domLoading
default long domLoading()
Returns the value that corresponds to thedomLoading
event.- Returns:
- the epoch time for the
domLoading
event
-
domLoading
default long domLoading(TimeUnit timeUnit)
Returns the value that corresponds to thedomLoading
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
domLoading
event
-
domInteractive
default long domInteractive()
Returns the value that corresponds to thedomInteractive
event.- Returns:
- the epoch time for the
domInteractive
event
-
domInteractive
default long domInteractive(TimeUnit timeUnit)
Returns the value that corresponds to thedomInteractive
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
domInteractive
event
-
domContentLoadedEventStart
default long domContentLoadedEventStart()
Returns the value that corresponds to thedomContentLoadedEventStart
event.- Returns:
- the epoch time for the
domContentLoadedEventStart
event
-
domContentLoadedEventStart
default long domContentLoadedEventStart(TimeUnit timeUnit)
Returns the value that corresponds to thedomContentLoadedEventStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
domContentLoadedEventStart
event
-
domContentLoadedEventEnd
default long domContentLoadedEventEnd()
Returns the value that corresponds to thedomContentLoadedEventEnd
event.- Returns:
- the epoch time for the
domContentLoadedEventEnd
event
-
domContentLoadedEventEnd
default long domContentLoadedEventEnd(TimeUnit timeUnit)
Returns the value that corresponds to thedomContentLoadedEventEnd
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
domContentLoadedEventEnd
event
-
domComplete
default long domComplete()
Returns the value that corresponds to thedomComplete
event.- Returns:
- the epoch time for the
domComplete
event
-
domComplete
default long domComplete(TimeUnit timeUnit)
Returns the value that corresponds to thedomComplete
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
domComplete
event
-
loadEventStart
default long loadEventStart()
Returns the value that corresponds to theloadEventStart
event.- Returns:
- the epoch time for the
loadEventStart
event
-
loadEventStart
default long loadEventStart(TimeUnit timeUnit)
Returns the value that corresponds to theloadEventStart
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
loadEventStart
event
-
loadEventEnd
default long loadEventEnd()
Returns the value that corresponds to theloadEventEnd
event.- Returns:
- the epoch time for the
loadEventEnd
event
-
loadEventEnd
default long loadEventEnd(TimeUnit timeUnit)
Returns the value that corresponds to theloadEventEnd
event, converted to the given time unit.- Parameters:
timeUnit
- the time unit to convert the metrics values to- Returns:
- the converted time for the
loadEventEnd
event
-
getEventValue
long getEventValue(PerformanceTimingEvent event)
Returns the value for the argument event type.- Parameters:
event
- the event, never null- Returns:
- the event value
-
getEventValue
default long getEventValue(PerformanceTimingEvent event, TimeUnit timeUnit)
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.timing
object wrapped in aPerformanceTimingMetrics
object.- Returns:
- the performance timing metrics
-
-