public interface ResourceMethodStatistics
snapshot()
method returns an immutable snapshot with consistent data. The principles of using statistics
is similar to principles of using MonitoringStatistics
.
Statistics contain two ExecutionStatistics
where getMethodStatistics()
contains
statistics for execution of the code of resource method and getRequestStatistics()
contains
statistics for complete processing of requests that were matched to the resource method. This implies that
getRequestStatistics()
will tend to contain higher time measurements as they measure total request
processing time and not only execution of the resource method.
Statistics retrieved from Jersey runtime might be mutable and thanks to it might provide inconsistent data
as not all statistics are updated in the same time. To retrieve the immutable and consistent
statistics data the method snapshot()
should be used.See monitoring statistics for more details.
Modifier and Type | Method and Description |
---|---|
ExecutionStatistics |
getMethodStatistics()
Get
execution statistics that contain measurements of times only for
execution of resource method. |
ExecutionStatistics |
getRequestStatistics()
Get
execution statistics that contain measurements of times for
whole processing from time when request comes into the Jersey application until the response
is written to the underlying IO container. |
ResourceMethod |
getResourceMethod()
Get a
resource method for which this ResourceMethodStatistics are calculated. |
ResourceMethodStatistics |
snapshot()
Deprecated.
implementing class is immutable hence snapshot creation is not needed anymore
|
ExecutionStatistics getMethodStatistics()
execution statistics
that contain measurements of times only for
execution of resource method. Durations average time, minimum time and maximum time
measure only time of execution of resource method code. It does not involve other request processing
phases.ExecutionStatistics getRequestStatistics()
execution statistics
that contain measurements of times for
whole processing from time when request comes into the Jersey application until the response
is written to the underlying IO container. The statistics involves only requests that were matched
to resource method defined by getResourceMethod()
.ResourceMethod getResourceMethod()
resource method
for which this ResourceMethodStatistics
are calculated.@Deprecated ResourceMethodStatistics snapshot()
Copyright © 2007-2023, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.