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
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
statsBowireBenchmarkStatsthresholdsIReadOnlyList<BowireThresholdResult>
Returns
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
statsBowireBenchmarkStatsthresholdsIReadOnlyList<BowireThresholdResult>priceProfileBowirePriceProfile
Returns
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
statsBowireHoldStatsthresholdsIReadOnlyList<BowireThresholdResult>
Returns
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
targetsIReadOnlyList<BowireK6Target>
Returns
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
Returns
Render(BowireBenchmarkStats, IReadOnlyList<BowireThresholdResult>?)
Serialise Build(BowireBenchmarkStats, IReadOnlyList<BowireThresholdResult>?)'s document.
public static string Render(BowireBenchmarkStats stats, IReadOnlyList<BowireThresholdResult>? thresholds = null)
Parameters
statsBowireBenchmarkStatsthresholdsIReadOnlyList<BowireThresholdResult>
Returns
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
statsBowireBenchmarkStatsthresholdsIReadOnlyList<BowireThresholdResult>priceProfileBowirePriceProfile
Returns
RenderHold(BowireHoldStats, IReadOnlyList<BowireThresholdResult>?)
#624 — serialise BuildHold(BowireHoldStats, IReadOnlyList<BowireThresholdResult>?)'s document.
public static string RenderHold(BowireHoldStats stats, IReadOnlyList<BowireThresholdResult>? thresholds = null)
Parameters
statsBowireHoldStatsthresholdsIReadOnlyList<BowireThresholdResult>
Returns
RenderTargets(IReadOnlyList<BowireK6Target>)
#622 — serialise BuildTargets(IReadOnlyList<BowireK6Target>)'s document.
public static string RenderTargets(IReadOnlyList<BowireK6Target> targets)
Parameters
targetsIReadOnlyList<BowireK6Target>
Returns
ResponseMetricName(string)
#621 — the k6 metric a declared response metric is written under.
public static string ResponseMetricName(string name)
Parameters
namestring