Class BowireResponseMetric

Namespace
Kuestenlogik.Bowire.Benchmarking
Assembly
Kuestenlogik.Bowire.Benchmarking.dll

#621 — a value each response reports, declared for a run as name=expression: tokens-out=usage.completion_tokens, cost=usage.prompt_tokens * rate.input + usage.completion_tokens * rate.output. It is evaluated per completed call and aggregated like a latency, so a threshold reads cost-sum < 0.05 or tokens-out-p95 < 2000.

public sealed class BowireResponseMetric
Inheritance
BowireResponseMetric
Inherited Members

Properties

Expression

What is evaluated per response.

public BowireMetricExpression Expression { get; }

Property Value

BowireMetricExpression

Name

The metric's name: lower-case letters, digits, '-' and '_', starting with a letter.

public string Name { get; }

Property Value

string

Methods

AggregationName(BowireMetricAggregation)

The spelling of an aggregation in a threshold: sum, p95 ….

public static string AggregationName(BowireMetricAggregation aggregation)

Parameters

aggregation BowireMetricAggregation

Returns

string

TryParse(string?, out BowireResponseMetric?, out string?)

Parse name=expression; false with a readable error.

public static bool TryParse(string? spec, out BowireResponseMetric? metric, out string? error)

Parameters

spec string
metric BowireResponseMetric
error string

Returns

bool

TrySplitThresholdMetric(string, out string, out BowireMetricAggregation)

Split tokens-out-p95 into the metric's name and its aggregation.

public static bool TrySplitThresholdMetric(string text, out string name, out BowireMetricAggregation aggregation)

Parameters

text string
name string
aggregation BowireMetricAggregation

Returns

bool