Skip to content

StepPerformance

Namespace: Vercel.AI

public sealed class StepPerformance

Performance metrics for one step. Maps to StepResultPerformance.

Inheritance: object

View source

public double EffectiveOutputTokensPerSecond { get; init; }

Effective output tokens per second over the full model response.

Value: double

View source

public double EffectiveTotalTokensPerSecond { get; init; }

Effective input and output tokens per second over the full model response.

Value: double

View source

public static StepPerformance Empty { get; }

A step with every metric at zero.

Value: StepPerformance

View source

public double? InputTokensPerSecond { get; init; }

Input tokens per second before the first output chunk. Only set for streaming steps.

Value: double?

View source

public double? OutputTokensPerSecond { get; init; }

Output tokens per second after the first output chunk. Only set for streaming steps.

Value: double?

View source

public double ResponseTimeMs { get; init; }

Time spent waiting for the model response in milliseconds.

Value: double

View source

public double StepTimeMs { get; init; }

Total time spent on the step in milliseconds.

Value: double

View source

public OutputChunkTimingStats? TimeBetweenOutputChunksMs { get; init; }

Gaps between output chunks. Only set for streaming steps with at least two output chunks.

Value: OutputChunkTimingStats

View source

public double? TimeToFirstOutputMs { get; init; }

Time until the first generated output chunk in milliseconds. Only set for streaming steps.

Value: double?

View source

public IReadOnlyDictionary<string, double> ToolExecutionMs { get; init; }

Time spent executing each client-side tool call in milliseconds, keyed by tool call id.

Value: IReadOnlyDictionary<string, double>

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product