Class BowireBenchmarkRunner
- Namespace
- Kuestenlogik.Bowire.Benchmarking
- Assembly
- Kuestenlogik.Bowire.Benchmarking.dll
Drives a protocol plugin's invoke path in a loop and collects latencies
(#360). Deliberately thin: it owns concurrency, warm-up and timing, and
leaves the transport to IBowireProtocol — the same seam
bowire call and bowire test invoke through, so a benchmark
measures the request path the rest of the tool actually uses.
public static class BowireBenchmarkRunner
- Inheritance
-
BowireBenchmarkRunner
- Inherited Members
Methods
IsOk(string?)
Whether a call counts as successful. Mirrors isHistoryEntryOk
in the workbench (history-env.js) exactly — 'OK' / 'Connected' /
'Completed', any numeric status below 400, everything else an error.
The UI's benchmark rail classifies through that same helper, and a
CLI that drew the line elsewhere would report a different error rate
than the rail for an identical run.
public static bool IsOk(string? status)
Parameters
statusstring
Returns
IsStreamingAsync(IBowireProtocol, BowireBenchmarkRequest, CancellationToken)
#620 — whether request's method streams, as the
plugin's discovery describes it: server streaming without client
streaming, which InvokeStreamAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)
serves. A method discovery does not list, or a discovery that
fails, is taken as unary: the run then measures what it always did.
public static Task<bool> IsStreamingAsync(IBowireProtocol protocol, BowireBenchmarkRequest request, CancellationToken ct = default)
Parameters
protocolIBowireProtocolrequestBowireBenchmarkRequestctCancellationToken
Returns
RunAsync(IBowireProtocol, BowireBenchmarkRequest, CancellationToken)
Run request against protocol.
Failures are counted rather than thrown: a benchmark's job is to
report an error rate, not to abandon the run on the first 500.
public static Task<BowireBenchmarkRun> RunAsync(IBowireProtocol protocol, BowireBenchmarkRequest request, CancellationToken ct = default)
Parameters
protocolIBowireProtocolrequestBowireBenchmarkRequestctCancellationToken