java.lang.Object
java.lang.Record
org.elasticsearch.http.HttpRouteStats
- Record Components:
requestCount
- the number of request handled by the HTTP routetotalRequestSize
- the total body size (bytes) of requests handled by the HTTP routerequestSizeHistogram
- an array of frequencies of request size (bytes) in buckets with upper bounds as returned byHttpRouteStatsTracker.getBucketUpperBounds()
, plus an extra bucket for handling size larger than the largest upper bound (currently 64MB).responseCount
- the number of responses produced by the HTTP routetotalResponseSize
- the total body size (bytes) of responses produced by the HTTP routeresponseSizeHistogram
- similar torequestSizeHistogram
but for response sizeresponseTimeHistogram
- an array of frequencies of response time (millis) in buckets with upper bounds as returned byHandlingTimeTracker.getBucketUpperBounds()
, plus an extra bucket for handling response time larger than the longest upper bound (currently 65536ms).
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
public record HttpRouteStats(long requestCount, long totalRequestSize, long[] requestSizeHistogram, long responseCount, long totalResponseSize, long[] responseSizeHistogram, long[] responseTimeHistogram)
extends Record
implements Writeable, ToXContentObject
This class encapsulates the stats for a single HTTP route
MethodHandlers
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionHttpRouteStats
(long requestCount, long totalRequestSize, long[] requestSizeHistogram, long responseCount, long totalResponseSize, long[] responseSizeHistogram, long[] responseTimeHistogram) Creates an instance of aHttpRouteStats
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.static HttpRouteStats
merge
(HttpRouteStats first, HttpRouteStats second) long
Returns the value of therequestCount
record component.long[]
Returns the value of therequestSizeHistogram
record component.long
Returns the value of theresponseCount
record component.long[]
Returns the value of theresponseSizeHistogram
record component.long[]
Returns the value of theresponseTimeHistogram
record component.final String
toString()
Returns a string representation of this record class.long
Returns the value of thetotalRequestSize
record component.long
Returns the value of thetotalResponseSize
record component.toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
HttpRouteStats
- Throws:
IOException
-
HttpRouteStats
public HttpRouteStats(long requestCount, long totalRequestSize, long[] requestSizeHistogram, long responseCount, long totalResponseSize, long[] responseSizeHistogram, long[] responseTimeHistogram) Creates an instance of aHttpRouteStats
record class.- Parameters:
requestCount
- the value for therequestCount
record componenttotalRequestSize
- the value for thetotalRequestSize
record componentrequestSizeHistogram
- the value for therequestSizeHistogram
record componentresponseCount
- the value for theresponseCount
record componenttotalResponseSize
- the value for thetotalResponseSize
record componentresponseSizeHistogram
- the value for theresponseSizeHistogram
record componentresponseTimeHistogram
- the value for theresponseTimeHistogram
record component
-
-
Method Details
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
merge
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
requestCount
public long requestCount()Returns the value of therequestCount
record component.- Returns:
- the value of the
requestCount
record component
-
totalRequestSize
public long totalRequestSize()Returns the value of thetotalRequestSize
record component.- Returns:
- the value of the
totalRequestSize
record component
-
requestSizeHistogram
public long[] requestSizeHistogram()Returns the value of therequestSizeHistogram
record component.- Returns:
- the value of the
requestSizeHistogram
record component
-
responseCount
public long responseCount()Returns the value of theresponseCount
record component.- Returns:
- the value of the
responseCount
record component
-
totalResponseSize
public long totalResponseSize()Returns the value of thetotalResponseSize
record component.- Returns:
- the value of the
totalResponseSize
record component
-
responseSizeHistogram
public long[] responseSizeHistogram()Returns the value of theresponseSizeHistogram
record component.- Returns:
- the value of the
responseSizeHistogram
record component
-
responseTimeHistogram
public long[] responseTimeHistogram()Returns the value of theresponseTimeHistogram
record component.- Returns:
- the value of the
responseTimeHistogram
record component
-