Package io.opencensus.common
Class ServerStats
- java.lang.Object
-
- io.opencensus.common.ServerStats
-
- Direct Known Subclasses:
AutoValue_ServerStats
@Immutable public abstract class ServerStats extends java.lang.Object
A representation of stats measured on the server side.- Since:
- 0.16
-
-
Constructor Summary
Constructors Constructor Description ServerStats()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ServerStats
create(long lbLatencyNs, long serviceLatencyNs, byte traceOption)
Creates newServerStats
from specified parameters.abstract long
getLbLatencyNs()
Returns Load Balancer latency, a latency observed at Load Balancer.abstract long
getServiceLatencyNs()
Returns Service latency, a latency observed at Server.abstract byte
getTraceOption()
Returns Trace options, a set of bits indicating properties of trace.
-
-
-
Method Detail
-
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
public static ServerStats create(long lbLatencyNs, long serviceLatencyNs, byte traceOption)
Creates newServerStats
from 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
ServerStats
with specified fields. - Throws:
java.lang.IllegalArgumentException
- if the arguments are out of range.- Since:
- 0.16
-
-