Class ServerStats
java.lang.Object
io.opencensus.common.ServerStats
- Direct Known Subclasses:
AutoValue_ServerStats
A representation of stats measured on the server side.
- Since:
- 0.16
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerStatscreate(long lbLatencyNs, long serviceLatencyNs, byte traceOption) Creates newServerStatsfrom specified parameters.abstract longReturns Load Balancer latency, a latency observed at Load Balancer.abstract longReturns Service latency, a latency observed at Server.abstract byteReturns Trace options, a set of bits indicating properties of trace.
-
Constructor Details
-
ServerStats
ServerStats()
-
-
Method Details
-
getLbLatencyNs
public abstract long getLbLatencyNs()Returns Load Balancer latency, a latency observed at Load Balancer.- Returns:
- Load Balancer latency in nanoseconds.
- Since:
- 0.16
-
getServiceLatencyNs
public abstract long getServiceLatencyNs()Returns Service latency, a latency observed at Server.- Returns:
- Service latency in nanoseconds.
- Since:
- 0.16
-
getTraceOption
public abstract byte getTraceOption()Returns Trace options, a set of bits indicating properties of trace.- Returns:
- Trace options a set of bits indicating properties of trace.
- Since:
- 0.16
-
create
Creates newServerStatsfrom specified parameters.- Parameters:
lbLatencyNs- Represents request processing latency observed on Load Balancer. It is measured in nanoseconds. Must not be less than 0. Value of 0 represents that the latency is not measured.serviceLatencyNs- Represents request processing latency observed on Server. It is measured in nanoseconds. Must not be less than 0. Value of 0 represents that the latency is not measured.traceOption- Represents set of bits to indicate properties of trace. Currently it used only the least signification bit to represent sampling of the request on the server side. Other bits are ignored.- Returns:
- new
ServerStatswith specified fields. - Throws:
IllegalArgumentException- if the arguments are out of range.- Since:
- 0.16
-