{"id":18791751,"url":"https://github.com/phip1611/ttfb","last_synced_at":"2025-04-05T07:05:09.593Z","repository":{"id":38185729,"uuid":"384461456","full_name":"phip1611/ttfb","owner":"phip1611","description":"Library + CLI-Tool to measure the TTFB (time to first byte) of HTTP requests. Additionally, this crate measures the times of DNS lookup, TCP connect and TLS handshake.","archived":false,"fork":false,"pushed_at":"2025-03-02T12:13:53.000Z","size":190,"stargazers_count":44,"open_issues_count":5,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T06:07:10.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phip1611.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-09T14:26:35.000Z","updated_at":"2025-03-06T14:48:35.000Z","dependencies_parsed_at":"2023-11-14T19:29:27.835Z","dependency_job_id":"ba41ca70-3b75-40fe-bab5-235940a2ec35","html_url":"https://github.com/phip1611/ttfb","commit_stats":{"total_commits":96,"total_committers":4,"mean_commits":24.0,"dds":0.125,"last_synced_commit":"068c564824ca85adafa6d849cbbf51480816ecae"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phip1611%2Fttfb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phip1611%2Fttfb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phip1611%2Fttfb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phip1611%2Fttfb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phip1611","download_url":"https://codeload.github.com/phip1611/ttfb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299831,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T21:16:42.404Z","updated_at":"2025-04-05T07:05:09.588Z","avatar_url":"https://github.com/phip1611.png","language":"Rust","funding_links":[],"categories":["\u003ca name=\"networking\"\u003e\u003c/a\u003eNetworking"],"sub_categories":[],"readme":"# TTFB: CLI + Lib to Measure the TTFB of HTTP/1.1 Requests\n\nSimilar to the network tab in Google Chrome or Mozilla Firefox, this\ncrate helps you find the timings for:\n\n- DNS lookup (if domain is specified, i.e., no IP is given)\n- TCP connection start\n- TLS handshake (if https/TLS is used)\n- Initial GET-Request\n- TTFB (Time To First Byte)\n\nIt builds upon the crates [trust-dns-resolver](crates.io/crate/trust-dns-resolver) for modern and secure\nDNS resolving of domains and [native-tls](crates.io/crate/native-tls) for handling TLS v1.2/1.3.\n\n## Cross Platform\nCLI + lib work on Linux, MacOS, and Windows.\n\n## Usage Binary/CLI tool\nInstall with `cargo install ttfb --features bin`. It takes one argument and passes it to the library.\nThe string you pass here as first argument is the same as for the library function.\n\nAdditionally, the CLI takes a `-k/--insecure` option. \\\nExample: `$ ttfb -k https://expired.badssl.com`\n\n## Usage Library\nThe library exposes the function `ttfb(url: String)`. The string can be for example:\n- `phip1611.de` (defaults to `http://`)\n- `http://phip1611.de`\n- `https://phip1611.de`\n- `https://phip1611.de?foo=bar`\n- `https://sub.domain.phip1611.de?foo=bar`\n- `http://12.34.56.78/foobar`\n- `https://1.1.1.1`\n- `12.34.56.78/foobar` (defaults to `http://`)\n- `12.34.56.78` (defaults to `http://`)\n\n## Example Output\nIf you installed the CLI and invoke it like `$ ttfb https://phip1611.de`, the output will look like:\n```text\nTTFB for https://phip1611.de (by ttfb@v1.1.1)\nPROPERTY        REL TIME (ms)   ABS TIME (ms)\nDNS Lookup    :         0.755           0.755  (probably cached)\nTCP connect   :        35.484          36.239\nTLS Handshake :        36.363          72.603\nHTTP GET Req  :         0.011          72.614\nHTTP Resp TTFB:        76.432         149.046\n```\n\n## MSRV\nThe MSRV of the library is `1.85.0` stable.\nThe MSRV of the binary is `1.85.0` stable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphip1611%2Fttfb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphip1611%2Fttfb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphip1611%2Fttfb/lists"}