Count WebSocket upgrades as successful calls and tidy the report (refs #95)
ci / test (postgres) (pull_request) Successful in 9m14s
ci / test (sqlite) (push) Successful in 4m11s
ci / test (sqlite) (pull_request) Successful in 4m12s
ci / test (postgres) (push) Successful in 9m40s
ci / image (pull_request) Successful in 2m14s
ci / image (push) Successful in 54s
ci / test (postgres) (pull_request) Successful in 9m14s
ci / test (sqlite) (push) Successful in 4m11s
ci / test (sqlite) (pull_request) Successful in 4m12s
ci / test (postgres) (push) Successful in 9m40s
ci / image (pull_request) Successful in 2m14s
ci / image (push) Successful in 54s
Trying the packaged release showed three things to fix: a 101 answer that opens a WebSocket was counted as a failure, the duration buckets were too coarse around the usual 200-500 ms of the brokers, and the report mixed CRLF and LF lines and named SQLite only by its version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6e365673b8
commit
9cf386d08b
4 files changed
+10
-7
No files matched your search
@@ -24,7 +24,7 @@ public sealed class DiagnosticsTests
|
||||
using var source = new Meter(HttpCallMeter.MeterName);
|
||||
var duration = source.CreateHistogram<double>(HttpCallMeter.InstrumentName, "s");
|
||||
const string host = "misura.invalid";
|
||||
foreach (var (seconds, status) in new[] { (0.04, 200), (0.08, 200), (0.4, 200), (2.5, 503) })
|
||||
foreach (var (seconds, status) in new[] { (0.04, 200), (0.08, 101), (0.4, 200), (2.5, 503) })
|
||||
{
|
||||
duration.Record(seconds, new("server.address", host), new("server.port", 443), new("http.response.status_code", status));
|
||||
}
|
||||
@@ -35,10 +35,12 @@ public sealed class DiagnosticsTests
|
||||
var main = calls[host];
|
||||
Assert.AreEqual(4, main.Calls);
|
||||
Assert.AreEqual(1, main.Failures);
|
||||
Assert.AreEqual(3, main.Outcomes["200"]);
|
||||
Assert.AreEqual(2, main.Outcomes["200"]);
|
||||
Assert.AreEqual(1, main.Outcomes["101"], "A WebSocket that opens is not a failure.");
|
||||
Assert.AreEqual(1, main.Outcomes["503"]);
|
||||
Assert.AreEqual(2500, main.MaxMs);
|
||||
Assert.AreEqual(100, main.Percentile(0.5), "The second fastest call is under the 100 ms bound.");
|
||||
Assert.AreEqual(400, main.Percentile(0.75));
|
||||
Assert.AreEqual(2500, main.Percentile(0.95), "Never more than the slowest call.");
|
||||
Assert.AreEqual(1, calls[host + ":8443"].Failures);
|
||||
Assert.AreEqual(1, calls[host + ":8443"].Outcomes["timeout"]);
|
||||
|
||||
Reference in new issue
Block a user