Crate ttfb

Source
Expand description

Library + CLI-Tool to measure the TTFB (time to first byte) of HTTP(S) requests. Additionally, this crate measures the times of DNS lookup, TCP connect, and TLS handshake. This crate currently only supports HTTP/1.1. It can cope with TLS 1.2 and 1.3.LICENSE.

See ttfb which is the main function of the public interface.

§Cross Platform

CLI + lib work on Linux, MacOS, and Windows.

Structs§

AllowInvalidCertsVerifier
Custom verifier that allows invalid certificates.
DurationPair
Bundles the duration of a measurement step with the total duration since the beginning of the overall measurement.
TtfbOutcome
The final result of this library. It contains all the measured timings.

Enums§

InvalidUrlError
Errors during URL parsing.
ResolveDnsError
Errors during DNS resolving.
TtfbError
Errors of the public interface of this crate.

Functions§

ttfb
Takes a URL and connects to it via http/1.1. Measures time for DNS lookup, TCP connection start, TLS handshake, and TTFB (Time to First Byte) of HTML content.