Package com.tnsai.llm.routing
Record Class TaskBasedRouter.TaskRoutingStats
java.lang.Object
java.lang.Record
com.tnsai.llm.routing.TaskBasedRouter.TaskRoutingStats
- Enclosing class:
TaskBasedRouter
public static record TaskBasedRouter.TaskRoutingStats(Map<TaskType,Long> requestsPerTask, Map<TaskType,Long> tokensPerTask, double estimatedSavings, LLMRouter.RoutingStats routingStats)
extends Record
Task routing statistics.
-
Constructor Summary
ConstructorsConstructorDescriptionTaskRoutingStats(Map<TaskType, Long> requestsPerTask, Map<TaskType, Long> tokensPerTask, double estimatedSavings, LLMRouter.RoutingStats routingStats) Creates an instance of aTaskRoutingStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theestimatedSavingsrecord component.final inthashCode()Returns a hash code value for this object.Returns the most common task type.Returns the value of therequestsPerTaskrecord component.Returns the value of theroutingStatsrecord component.Returns the task distribution as percentages.Returns the value of thetokensPerTaskrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TaskRoutingStats
public TaskRoutingStats(Map<TaskType, Long> requestsPerTask, Map<TaskType, Long> tokensPerTask, double estimatedSavings, LLMRouter.RoutingStats routingStats) Creates an instance of aTaskRoutingStatsrecord class.- Parameters:
requestsPerTask- the value for therequestsPerTaskrecord componenttokensPerTask- the value for thetokensPerTaskrecord componentestimatedSavings- the value for theestimatedSavingsrecord componentroutingStats- the value for theroutingStatsrecord component
-
-
Method Details
-
mostCommonTask
Returns the most common task type. -
taskDistribution
Returns the task distribution as percentages. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
requestsPerTask
Returns the value of therequestsPerTaskrecord component.- Returns:
- the value of the
requestsPerTaskrecord component
-
tokensPerTask
Returns the value of thetokensPerTaskrecord component.- Returns:
- the value of the
tokensPerTaskrecord component
-
estimatedSavings
public double estimatedSavings()Returns the value of theestimatedSavingsrecord component.- Returns:
- the value of the
estimatedSavingsrecord component
-
routingStats
Returns the value of theroutingStatsrecord component.- Returns:
- the value of the
routingStatsrecord component
-