SessionMetrics class

Session metrics containing token usage and performance statistics.

Constructors

SessionMetrics({int inputTokens = 0, int outputTokens = 0, int totalTokens = 0, double? timeToFirstTokenMs, double? tokensPerSecond, double? initTimeMs})

Properties

hashCode int
The hash code for this object.
no setterinherited
initTimeMs double?
Session initialization time in milliseconds (if available).
final
inputTokens int
Number of input tokens (prompt tokens).
final
outputTokens int
Number of output tokens (generated tokens).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeToFirstTokenMs double?
Time to first token in milliseconds (if available).
final
tokensPerSecond double?
Average tokens per second generation speed (if available).
final
totalTokens int
Total tokens (input + output).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited