Class DefaultPerformanceTiming

  • All Implemented Interfaces:
    PerformanceTiming

    public class DefaultPerformanceTiming
    extends Object
    implements PerformanceTiming
    Default implementation of PerformanceTiming.

    Via this implementation you can retrieve the W3C Performance Timing event values from the browser relative to the value of the navigationStart attribute value, thus it won't return epoch values as querying the corresponding Javascript attribute directly would, but rather handles navigationStart as zero and returns time values passed since that point in time.

    This implementation executes the query (window.performance.timing.) with a simple JavascriptExecutor in a synchronous way.

    If a query for a certain metric returns 0 it means it happened at the same moment (at least in epoch) than navigationStart.

    A query for a certain metrics returns a negative value if the event has not been registered on the page, or it is not feasible/valid for the given page/page load/redirect.