Class BowireK6Summary

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

Renders a run as k6-summary JSON (#234 shape, #360 thresholds).

The metric block mirrors what the workbench rail already exports (http_req_duration / http_reqs / iterations / iteration_duration / http_req_failed / checks), so a dashboard that ingests a run exported from the UI ingests one written by bowire bench run without a second code path.

Thresholds ride along the way k6 itself reports them: keyed by their source text inside the metric they constrain, each with an ok flag. That is what makes "downstream tooling agrees" true rather than aspirational — a CI dashboard reading k6 summaries finds Bowire's budgets exactly where it looks for k6's.

public static class BowireK6Summary
Inheritance
BowireK6Summary
Inherited Members

Fields

FirstChunkMetric

#620 — the k6 metric name time to first chunk is written under.

public const string FirstChunkMetric = "bowire_time_to_first_chunk"

Field Value

string

Methods

Build(BowireBenchmarkStats, IReadOnlyList<BowireThresholdResult>?)

Build the summary document for stats, annotating each metric with any threshold that constrains it.

public static JsonObject Build(BowireBenchmarkStats stats, IReadOnlyList<BowireThresholdResult>? thresholds = null)

Parameters

stats BowireBenchmarkStats
thresholds IReadOnlyList<BowireThresholdResult>

Returns

JsonObject

Build(BowireBenchmarkStats, IReadOnlyList<BowireThresholdResult>?, BowirePriceProfile?)

#621 — as Build(BowireBenchmarkStats, IReadOnlyList<BowireThresholdResult>?), with each declared response metric as a trend of its own (bowire_metric_<name>, its sum and missing beside the percentiles) and the rates its cost figures were computed with under bowire.priceProfile.

public static JsonObject Build(BowireBenchmarkStats stats, IReadOnlyList<BowireThresholdResult>? thresholds, BowirePriceProfile? priceProfile)

Parameters

stats BowireBenchmarkStats
thresholds IReadOnlyList<BowireThresholdResult>
priceProfile BowirePriceProfile

Returns

JsonObject

BuildHold(BowireHoldStats, IReadOnlyList<BowireThresholdResult>?)

#624 — a connection hold in k6-summary shape. Lifetimes are a trend in seconds (bowire_connection_lifetime), gaps and first chunks trends in milliseconds, survival a rate, reconnects / dropped / quiet counters; each threshold sits on the metric it reads. Every connection, with how it ended, is listed under bowire.connections.

public static JsonObject BuildHold(BowireHoldStats stats, IReadOnlyList<BowireThresholdResult>? thresholds = null)

Parameters

stats BowireHoldStats
thresholds IReadOnlyList<BowireThresholdResult>

Returns

JsonObject

BuildTargets(IReadOnlyList<BowireK6Target>)

#622 — several targets of one run in one summary. Each target's metrics are k6 submetrics tagged with it (http_req_duration{target:gpt-4o}, the way k6 writes a tagged threshold's submetric), with its thresholds attached there; each target's price profile sits under bowire.targets.<name>.priceProfile.

public static JsonObject BuildTargets(IReadOnlyList<BowireK6Target> targets)

Parameters

targets IReadOnlyList<BowireK6Target>

Returns

JsonObject

EndName(BowireConnectionEnd)

#624 — how a connection ended, as the reports write it: closed-by-us, closed-by-peer, error, timeout.

public static string EndName(BowireConnectionEnd end)

Parameters

end BowireConnectionEnd

Returns

string

Render(BowireBenchmarkStats, IReadOnlyList<BowireThresholdResult>?)

public static string Render(BowireBenchmarkStats stats, IReadOnlyList<BowireThresholdResult>? thresholds = null)

Parameters

stats BowireBenchmarkStats
thresholds IReadOnlyList<BowireThresholdResult>

Returns

string

Render(BowireBenchmarkStats, IReadOnlyList<BowireThresholdResult>?, BowirePriceProfile?)

#621 — serialise the document with response metrics and the price profile.

public static string Render(BowireBenchmarkStats stats, IReadOnlyList<BowireThresholdResult>? thresholds, BowirePriceProfile? priceProfile)

Parameters

stats BowireBenchmarkStats
thresholds IReadOnlyList<BowireThresholdResult>
priceProfile BowirePriceProfile

Returns

string

RenderHold(BowireHoldStats, IReadOnlyList<BowireThresholdResult>?)

public static string RenderHold(BowireHoldStats stats, IReadOnlyList<BowireThresholdResult>? thresholds = null)

Parameters

stats BowireHoldStats
thresholds IReadOnlyList<BowireThresholdResult>

Returns

string

RenderTargets(IReadOnlyList<BowireK6Target>)

#622 — serialise BuildTargets(IReadOnlyList<BowireK6Target>)'s document.

public static string RenderTargets(IReadOnlyList<BowireK6Target> targets)

Parameters

targets IReadOnlyList<BowireK6Target>

Returns

string

ResponseMetricName(string)

#621 — the k6 metric a declared response metric is written under.

public static string ResponseMetricName(string name)

Parameters

name string

Returns

string