Class DefaultPerformanceTimingMetrics

java.lang.Object
io.fluentlenium.core.performance.DefaultPerformanceTimingMetrics
All Implemented Interfaces:
PerformanceTimingMetrics<DefaultPerformanceTimingMetrics>

public class DefaultPerformanceTimingMetrics extends Object implements PerformanceTimingMetrics<DefaultPerformanceTimingMetrics>
Default implementation of PerformanceTimingMetrics storing the metrics value as a Map.

It also provides an option to convert all values in the current object to an arbitrary TimeUnit. For that you can call in(TimeUnit) on the current object.

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.

Take into account that when there is a time difference like 1675ms, and it is converted to e.g. seconds, the conversion will return 1sec for that instead of rounding it up to 2sec.

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.

See Also: