StepPerformance
Namespace: Vercel.AI
public sealed class StepPerformancePerformance metrics for one step. Maps to StepResultPerformance.
Inheritance: object
Properties
Section titled “Properties”EffectiveOutputTokensPerSecond
Section titled “EffectiveOutputTokensPerSecond”public double EffectiveOutputTokensPerSecond { get; init; }Effective output tokens per second over the full model response.
Value: double
EffectiveTotalTokensPerSecond
Section titled “EffectiveTotalTokensPerSecond”public double EffectiveTotalTokensPerSecond { get; init; }Effective input and output tokens per second over the full model response.
Value: double
public static StepPerformance Empty { get; }A step with every metric at zero.
Value: StepPerformance
InputTokensPerSecond
Section titled “InputTokensPerSecond”public double? InputTokensPerSecond { get; init; }Input tokens per second before the first output chunk. Only set for streaming steps.
Value: double?
OutputTokensPerSecond
Section titled “OutputTokensPerSecond”public double? OutputTokensPerSecond { get; init; }Output tokens per second after the first output chunk. Only set for streaming steps.
Value: double?
ResponseTimeMs
Section titled “ResponseTimeMs”public double ResponseTimeMs { get; init; }Time spent waiting for the model response in milliseconds.
Value: double
StepTimeMs
Section titled “StepTimeMs”public double StepTimeMs { get; init; }Total time spent on the step in milliseconds.
Value: double
TimeBetweenOutputChunksMs
Section titled “TimeBetweenOutputChunksMs”public OutputChunkTimingStats? TimeBetweenOutputChunksMs { get; init; }Gaps between output chunks. Only set for streaming steps with at least two output chunks.
Value: OutputChunkTimingStats
TimeToFirstOutputMs
Section titled “TimeToFirstOutputMs”public double? TimeToFirstOutputMs { get; init; }Time until the first generated output chunk in milliseconds. Only set for streaming steps.
Value: double?
ToolExecutionMs
Section titled “ToolExecutionMs”public IReadOnlyDictionary<string, double> ToolExecutionMs { get; init; }Time spent executing each client-side tool call in milliseconds, keyed by tool call id.
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product