Class HtmlUnitPerformanceTimingMetrics

  • All Implemented Interfaces:

    public class HtmlUnitPerformanceTimingMetrics
    extends Object
    implements PerformanceTimingMetrics<HtmlUnitPerformanceTimingMetrics>
    HtmlUnit specific implementation of PerformanceTimingMetrics.

    The values returned from this object are not epoch values as querying the corresponding Javascript attribute directly would return, but it rather handles navigationStart as zero and returns time values passed since that point in time.

    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.

    Though the HtmlUnit PerformanceTiming class is a mock implementation of the PerformanceTiming API, the lack of this adapter might cause issues.

    Before retrieving performance timing metrics from HtmlUnit, please check the aforementioned class whether it is still a mock object or meanwhile it has been implemented properly to return real values.