Module org.elasticsearch.server
Record Class InferenceStats
java.lang.Object
java.lang.Record
org.elasticsearch.inference.telemetry.InferenceStats
public record InferenceStats(LongCounter requestCount, LongHistogram inferenceDuration, LongHistogram deploymentDuration)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionInferenceStats(LongCounter requestCount, LongHistogram inferenceDuration, LongHistogram deploymentDuration) Creates an instance of aInferenceStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic InferenceStatscreate(MeterRegistry meterRegistry) Returns the value of thedeploymentDurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinferenceDurationrecord component.modelAndResponseAttributes(Model model, Throwable throwable) modelAttributes(Model model) modelAttributes(UnparsedModel model) Returns the value of therequestCountrecord component.responseAttributes(Throwable throwable) routingAttributes(boolean hasBeenRerouted, String nodeIdHandlingRequest) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InferenceStats
public InferenceStats(LongCounter requestCount, LongHistogram inferenceDuration, LongHistogram deploymentDuration) Creates an instance of aInferenceStatsrecord class.- Parameters:
requestCount- the value for therequestCountrecord componentinferenceDuration- the value for theinferenceDurationrecord componentdeploymentDuration- the value for thedeploymentDurationrecord component
-
-
Method Details
-
create
-
modelAttributes
-
routingAttributes
-
modelAttributes
-
responseAttributes
-
modelAndResponseAttributes
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
requestCount
Returns the value of therequestCountrecord component.- Returns:
- the value of the
requestCountrecord component
-
inferenceDuration
Returns the value of theinferenceDurationrecord component.- Returns:
- the value of the
inferenceDurationrecord component
-
deploymentDuration
Returns the value of thedeploymentDurationrecord component.- Returns:
- the value of the
deploymentDurationrecord component
-