Http module

http_statistics

procedure · 1 overloadSource

The counts of the running scheduler's pools, for tests and diagnostics. Call it on a scheduler, inside Io.io_run or a test client call. A program that closes or reads every response to the end shows no open responses.

Example
Io :: #import "Extensions/Io";

main :: () {
    Io.io_run(() {
        statistics := http_statistics();

        assert(statistics.open_responses == 0);
        assert(statistics.idle_connections == 0);
    });
}

Doesn't run in the browser (skipped on wasm).

http_statistics :: () -> Http_Statistics

The counts of the running scheduler's pools, for tests and diagnostics. Call it on a scheduler, inside Io.io_run or a test client call. A program that closes or reads every response to the end shows no open responses.

Returns

Example
Io :: #import "Extensions/Io";

main :: () {
    Io.io_run(() {
        statistics := http_statistics();

        assert(statistics.open_responses == 0);
        assert(statistics.idle_connections == 0);
    });
}

Doesn't run in the browser (skipped on wasm).

See also