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 torequestSizeHistogrambut 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.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionHttpRouteStats(long requestCount, long totalRequestSize, long[] requestSizeHistogram, long responseCount, long totalResponseSize, long[] responseSizeHistogram, long[] responseTimeHistogram) Creates an instance of aHttpRouteStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.static HttpRouteStatsmerge(HttpRouteStats first, HttpRouteStats second) longReturns the value of therequestCountrecord component.long[]Returns the value of therequestSizeHistogramrecord component.longReturns the value of theresponseCountrecord component.long[]Returns the value of theresponseSizeHistogramrecord component.long[]Returns the value of theresponseTimeHistogramrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalRequestSizerecord component.longReturns the value of thetotalResponseSizerecord component.toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
EMPTY
-
-
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 aHttpRouteStatsrecord class.- Parameters:
requestCount- the value for therequestCountrecord componenttotalRequestSize- the value for thetotalRequestSizerecord componentrequestSizeHistogram- the value for therequestSizeHistogramrecord componentresponseCount- the value for theresponseCountrecord componenttotalResponseSize- the value for thetotalResponseSizerecord componentresponseSizeHistogram- the value for theresponseSizeHistogramrecord componentresponseTimeHistogram- the value for theresponseTimeHistogramrecord component
-
-
Method Details
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
merge
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin 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 therequestCountrecord component.- Returns:
- the value of the
requestCountrecord component
-
totalRequestSize
public long totalRequestSize()Returns the value of thetotalRequestSizerecord component.- Returns:
- the value of the
totalRequestSizerecord component
-
requestSizeHistogram
public long[] requestSizeHistogram()Returns the value of therequestSizeHistogramrecord component.- Returns:
- the value of the
requestSizeHistogramrecord component
-
responseCount
public long responseCount()Returns the value of theresponseCountrecord component.- Returns:
- the value of the
responseCountrecord component
-
totalResponseSize
public long totalResponseSize()Returns the value of thetotalResponseSizerecord component.- Returns:
- the value of the
totalResponseSizerecord component
-
responseSizeHistogram
public long[] responseSizeHistogram()Returns the value of theresponseSizeHistogramrecord component.- Returns:
- the value of the
responseSizeHistogramrecord component
-
responseTimeHistogram
public long[] responseTimeHistogram()Returns the value of theresponseTimeHistogramrecord component.- Returns:
- the value of the
responseTimeHistogramrecord component
-