Skip to main content

Crate http_stat

Crate http_stat 

Source

Structs§

AltSvc
A single entry from the Alt-Svc response header (RFC 7838).
BenchmarkSummary
Certificate
ConnectTo
A single --connect-to HOST1:PORT1:HOST2:PORT2 entry.
Hsts
Parsed Strict-Transport-Security directive (RFC 6797).
HttpConnection
A reusable HTTP connection handle for benchmarking.
HttpRequest
HttpStat
Statistics and information collected during an HTTP request.
ServerTiming
A single entry parsed from the Server-Timing response header (RFC 8673 / W3C).
TcpInfo
Portable subset of getsockopt(TCP_INFO) exposed in the user-facing API.
TcpInfoDelta
Delta between two TCP_INFO samples — most useful: how many retransmits occurred during the request, plus the final RTT / cwnd seen by the kernel.
TcpInfoProbe
Captured socket handle that allows a TCP_INFO sample to be taken later, after the original TcpStream has been moved into the HTTP stack.

Enums§

Error
Lang
Supported display languages.

Constants§

FIRST_CHUNK_BYTES
Size of the “first chunk” window used for throughput splitting.
THROUGHPUT_DISPLAY_THRESHOLD
Threshold above which we render the overall Throughput line.

Statics§

ALPN_HTTP1
ALPN_HTTP2
ALPN_HTTP3

Functions§

connect
Establish an HTTP/1.1 or HTTP/2 connection and return a reusable handle.
decompress
format_duration
format_throughput
Format a throughput value (bytes/s) into a human-readable string using decimal units (MB/s = 10^6 B/s, the network-convention) — bandwidth is almost universally reported in decimal, even when storage uses binary.
new_tls_session_store
Create an in-memory TLS session store suitable for sharing across multiple requests (e.g. across a benchmark -n loop). Pass the returned Arc into HttpRequest::tls_session_store on every request that should be able to resume a previous TLS session.
parse_alt_svc
Parse one or more Alt-Svc header values into a flat list.
parse_hsts
Parse a single Strict-Transport-Security header value. Returns None if max-age is missing or unparsable (a directive without max-age is not a valid HSTS policy per RFC 6797 §6.1).
parse_server_timing
Parse all Server-Timing header values into a flat list of entries. Returns None if the input iterator yields no entries.
request
Performs an HTTP request and returns detailed statistics about the request lifecycle.

Type Aliases§

Result