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 Type
    Method
    Description
    default long
    Returns the value that corresponds to the connectEnd event.
    default long
    connectEnd (TimeUnit timeUnit)
    Returns the value that corresponds to the connectEnd event, converted to the given time unit.
    default long
    Returns the value that corresponds to the connectStart event.
    default long
    connectStart (TimeUnit timeUnit)
    Returns the value that corresponds to the connectStart event, converted to the given time unit.
    default long
    Returns the value that corresponds to the domainLookupEnd event.
    default long
    Returns the value that corresponds to the domainLookupEnd event, converted to the given time unit.
    default long
    Returns the value that corresponds to the domainLookupStart event.
    default long
    Returns the value that corresponds to the domainLookupStart event, converted to the given time unit.
    default long
    Returns the value that corresponds to the domComplete event.
    default long
    domComplete (TimeUnit timeUnit)
    Returns the value that corresponds to the domComplete event, converted to the given time unit.
    default long
    Returns the value that corresponds to the domContentLoadedEventEnd event.
    default long
    Returns the value that corresponds to the domContentLoadedEventEnd event, converted to the given time unit.
    default long
    Returns the value that corresponds to the domContentLoadedEventStart event.
    default long
    Returns the value that corresponds to the domContentLoadedEventStart event, converted to the given time unit.
    default long
    Returns the value that corresponds to the domInteractive event.
    default long
    Returns the value that corresponds to the domInteractive event, converted to the given time unit.
    default long
    Returns the value that corresponds to the domLoading event.
    default long
    domLoading (TimeUnit timeUnit)
    Returns the value that corresponds to the domLoading event, converted to the given time unit.
    default long
    Returns the value that corresponds to the fetchStart event.
    default long
    fetchStart (TimeUnit timeUnit)
    Returns the value that corresponds to the fetchStart event, converted to the given time unit.
    long
    Returns the value for the argument event type.
    default long
    Returns the value for the argument event type converted to the given time unit.
    Return all timing metrics, in particular the window.performance.timing object wrapped in a PerformanceTimingMetrics object.
    default long
    Returns the value that corresponds to the loadEventEnd event.
    default long
    loadEventEnd (TimeUnit timeUnit)
    Returns the value that corresponds to the loadEventEnd event, converted to the given time unit.
    default long
    Returns the value that corresponds to the loadEventStart event.
    default long
    Returns the value that corresponds to the loadEventStart event, converted to the given time unit.
    default long
    Returns the value that corresponds to the navigationStart event.
    default long
    Returns the value that corresponds to the navigationStart event, converted to the given time unit.
    default long
    Returns the value that corresponds to the redirectEnd event.
    default long
    redirectEnd (TimeUnit timeUnit)
    Returns the value that corresponds to the redirectEnd event, converted to the given time unit.
    default long
    Returns the value that corresponds to the redirectStart event.
    default long
    redirectStart (TimeUnit timeUnit)
    Returns the value that corresponds to the redirectStart event, converted to the given time unit.
    default long
    Returns the value that corresponds to the requestStart event.
    default long
    requestStart (TimeUnit timeUnit)
    Returns the value that corresponds to the requestStart event, converted to the given time unit.
    default long
    Returns the value that corresponds to the responseEnd event.
    default long
    responseEnd (TimeUnit timeUnit)
    Returns the value that corresponds to the responseEnd event, converted to the given time unit.
    default long
    Returns the value that corresponds to the responseStart event.
    default long
    responseStart (TimeUnit timeUnit)
    Returns the value that corresponds to the responseStart event, converted to the given time unit.
    default Object
    Returns the value that corresponds to the secureConnectionStart event.
    default Object
    Returns the value that corresponds to the secureConnectionStart event, converted to the given time unit.
    default long
    Returns the value that corresponds to the unloadEventEnd event.
    default long
    Returns the value that corresponds to the unloadEventEnd event, converted to the given time unit.
    default long
    Returns the value that corresponds to the unloadEventStart event.
    default long
    Returns the value that corresponds to the unloadEventStart event, converted to the given time unit.
  • Method Details

    • unloadEventStart

      default long unloadEventStart()
      Returns the value that corresponds to the unloadEventStart event.
      Returns:
      the epoch time for the unloadEventStart event
    • unloadEventStart

      default long unloadEventStart (TimeUnit timeUnit)
      Returns the value that corresponds to the unloadEventStart 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 the unloadEventEnd event.
      Returns:
      the epoch time for the unloadEventEnd event
    • unloadEventEnd

      default long unloadEventEnd (TimeUnit timeUnit)
      Returns the value that corresponds to the unloadEventEnd 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 the redirectStart event.
      Returns:
      the epoch time for the redirectStart event
    • redirectStart

      default long redirectStart (TimeUnit timeUnit)
      Returns the value that corresponds to the redirectStart 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 the redirectEnd event.
      Returns:
      the epoch time for the redirectEnd event
    • redirectEnd

      default long redirectEnd (TimeUnit timeUnit)
      Returns the value that corresponds to the redirectEnd 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 the fetchStart event.
      Returns:
      the epoch time for the fetchStart event
    • fetchStart

      default long fetchStart (TimeUnit timeUnit)
      Returns the value that corresponds to the fetchStart 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 the domainLookupStart event.
      Returns:
      the epoch time for the domainLookupStart event
    • domainLookupStart

      default long domainLookupStart (TimeUnit timeUnit)
      Returns the value that corresponds to the domainLookupStart 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 the domainLookupEnd event.
      Returns:
      the epoch time for the domainLookupEnd event
    • domainLookupEnd

      default long domainLookupEnd (TimeUnit timeUnit)
      Returns the value that corresponds to the domainLookupEnd 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 the connectStart event.
      Returns:
      the epoch time for the connectStart event
    • connectStart

      default long connectStart (TimeUnit timeUnit)
      Returns the value that corresponds to the connectStart 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 the connectEnd event.
      Returns:
      the epoch time for the connectEnd event
    • connectEnd

      default long connectEnd (TimeUnit timeUnit)
      Returns the value that corresponds to the connectEnd 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 the secureConnectionStart event.
      Returns:
      the epoch time for the secureConnectionStart event
    • secureConnectionStart

      default Object secureConnectionStart (TimeUnit timeUnit)
      Returns the value that corresponds to the secureConnectionStart 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 the requestStart event.
      Returns:
      the epoch time for the requestStart event
    • requestStart

      default long requestStart (TimeUnit timeUnit)
      Returns the value that corresponds to the requestStart 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 the responseStart event.
      Returns:
      the epoch time for the responseStart event
    • responseStart

      default long responseStart (TimeUnit timeUnit)
      Returns the value that corresponds to the responseStart 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 the responseEnd event.
      Returns:
      the epoch time for the responseEnd event
    • responseEnd

      default long responseEnd (TimeUnit timeUnit)
      Returns the value that corresponds to the responseEnd 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 the domLoading event.
      Returns:
      the epoch time for the domLoading event
    • domLoading

      default long domLoading (TimeUnit timeUnit)
      Returns the value that corresponds to the domLoading 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 the domInteractive event.
      Returns:
      the epoch time for the domInteractive event
    • domInteractive

      default long domInteractive (TimeUnit timeUnit)
      Returns the value that corresponds to the domInteractive 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 the domContentLoadedEventStart event.
      Returns:
      the epoch time for the domContentLoadedEventStart event
    • domContentLoadedEventStart

      default long domContentLoadedEventStart (TimeUnit timeUnit)
      Returns the value that corresponds to the domContentLoadedEventStart 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 the domContentLoadedEventEnd event.
      Returns:
      the epoch time for the domContentLoadedEventEnd event
    • domContentLoadedEventEnd

      default long domContentLoadedEventEnd (TimeUnit timeUnit)
      Returns the value that corresponds to the domContentLoadedEventEnd 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 the domComplete event.
      Returns:
      the epoch time for the domComplete event
    • domComplete

      default long domComplete (TimeUnit timeUnit)
      Returns the value that corresponds to the domComplete 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 the loadEventStart event.
      Returns:
      the epoch time for the loadEventStart event
    • loadEventStart

      default long loadEventStart (TimeUnit timeUnit)
      Returns the value that corresponds to the loadEventStart 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 the loadEventEnd event.
      Returns:
      the epoch time for the loadEventEnd event
    • loadEventEnd

      default long loadEventEnd (TimeUnit timeUnit)
      Returns the value that corresponds to the loadEventEnd 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 null
      timeUnit - the time unit to convert the value to
      Returns:
      the event value in the given time unit
    • getMetrics

      Return all timing metrics, in particular the window.performance.timing object wrapped in a PerformanceTimingMetrics object.
      Returns:
      the performance timing metrics