Package dev.dokimos.core
Record Class CallMetrics
java.lang.Object
java.lang.Record
dev.dokimos.core.CallMetrics
- Record Components:
tokensIn- prompt tokens consumed by the call, or null if not measuredtokensOut- completion tokens produced by the call, or null if not measuredcostUsd- cost of the call in US dollars, or null if not measuredlatencyMs- wall-clock latency of the call in milliseconds, or null if not measured
public record CallMetrics(Integer tokensIn, Integer tokensOut, Double costUsd, Long latencyMs)
extends Record
Optional metrics describing the LLM call that produced an item result. Any field may be null when
the corresponding measurement is not available.
-
Constructor Summary
ConstructorsConstructorDescriptionCallMetrics(Integer tokensIn, Integer tokensOut, Double costUsd, Long latencyMs) Creates an instance of aCallMetricsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncostUsd()Returns the value of thecostUsdrecord 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 thelatencyMsrecord component.tokensIn()Returns the value of thetokensInrecord component.Returns the value of thetokensOutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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). -
tokensIn
Returns the value of thetokensInrecord component.- Returns:
- the value of the
tokensInrecord component
-
tokensOut
Returns the value of thetokensOutrecord component.- Returns:
- the value of the
tokensOutrecord component
-
costUsd
Returns the value of thecostUsdrecord component.- Returns:
- the value of the
costUsdrecord component
-
latencyMs
Returns the value of thelatencyMsrecord component.- Returns:
- the value of the
latencyMsrecord component
-