{"id":13672422,"url":"https://github.com/lnx-search/rewrk","last_synced_at":"2025-05-16T05:04:14.602Z","repository":{"id":46008915,"uuid":"331078420","full_name":"lnx-search/rewrk","owner":"lnx-search","description":"A more modern http framework benchmarker supporting HTTP/1 and HTTP/2 benchmarks.","archived":false,"fork":false,"pushed_at":"2024-03-25T12:30:23.000Z","size":345,"stargazers_count":536,"open_issues_count":15,"forks_count":41,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-16T05:04:03.144Z","etag":null,"topics":["benchmark","http","rust","web"],"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/lnx-search.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-01-19T18:52:35.000Z","updated_at":"2025-05-14T19:11:12.000Z","dependencies_parsed_at":"2024-11-11T10:32:16.265Z","dependency_job_id":"5befdfb6-bb17-441e-8e71-155a3af8ba80","html_url":"https://github.com/lnx-search/rewrk","commit_stats":{"total_commits":89,"total_committers":8,"mean_commits":11.125,"dds":0.2696629213483146,"last_synced_commit":"d811b98a60f227cac7da75bb665cd94d24b389d9"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnx-search%2Frewrk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnx-search%2Frewrk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnx-search%2Frewrk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnx-search%2Frewrk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lnx-search","download_url":"https://codeload.github.com/lnx-search/rewrk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471061,"owners_count":22076585,"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":["benchmark","http","rust","web"],"created_at":"2024-08-02T09:01:35.101Z","updated_at":"2025-05-16T05:04:14.577Z","avatar_url":"https://github.com/lnx-search.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# rewrk\nA more modern http framework benchmark utility.\n\n```\nF:\\rewrk\u003e rewrk -h http://127.0.0.1:5000 -t 12 -c 60 -d 5s\n\nBenchmarking 60 connections @ http://127.0.0.1:5000 for 5 seconds\n  Latencies:\n    Avg      Stdev    Min      Max    \n    3.27ms   0.40ms   1.95ms   9.39ms\n  Requests:\n    Total:  91281  Req/Sec: 18227.81\n  Transfer:\n    Total: 1.13 MB Transfer Rate: 231.41 KB/Sec\n```\n\n*With optional --pct flag*\n```\n+ --------------- + --------------- +\n|   Percentile    |   Avg Latency   |\n+ --------------- + --------------- +\n|      99.9%      |     6.88ms      |\n|       99%       |     5.62ms      |\n|       95%       |     4.62ms      |\n|       90%       |     4.24ms      |\n|       75%       |     3.78ms      |\n|       50%       |     3.49ms      |\n+ --------------- + --------------- +\n```\n\n# Motivation\nThe motivation behind this project extends from developers tunnel visioning on benchmarks like [techempower](https://www.techempower.com/benchmarks/) that use the benchmarking tool called [wrk](https://github.com/wg/wrk).\n\nThe issue is that wrk only handle *some* of the HTTP spec and is entirely biased towards frameworks and servers that can make heavy use of HTTP/1 Pipelining which is no longer enabled in most modern browsers or clients, this can give a very unfair and unreasonable set of stats when comparing frameworks as those at the top are simply\nbetter at using a process which is now not used greatly.\n\nThis is where rewrk comes in, this benchmarker is built on top of [hyper's client api](https://github.com/hyperium/hyper) and brings with it many advantages and more realistic methods of benchmarking.\n\n### Current features\n- Supports **both** HTTP/1 and HTTP/2.\n- Pipelining is disabled giving a more realistic idea on actual performance.\n- Multi-Platform support, developed on Windows but will run on Mac and Linux as well.\n\n### To do list\n- Add a random artificial delay benchmark to simulate random latency with clients.\n- Arithmetic benchmark to simulate different loads across clients.\n- State checking, making the frameworks and servers use all of their API rather than a minimised set.\n- JSON deserialization and validation benchmarks and checking.\n- Truly concurrent HTTP/2 benchmark.\n\n# Usage\nUsage is relatively simple, if you have a compiled binary simply run using the CLI.\n\n## Example\nHere's an example to produce the following benchmark:\n- 256 connections (`-c 256`)\n- HTTP/2 only (`--http2`)\n- 12 threads (`-t 12`)\n- 15 seconds (`-d 15s`)\n- with percentile table (`--pct`)\n- on host `http://127.0.0.1:5000` (`-h http://127.0.0.1:5000`)\u003cbr\u003e\n\n**CLI command:**\u003cbr\u003e\n`rewrk -c 256 -t 12 -d 15s -h http://127.0.0.1:5000 --http2 --pct`\n\n\n## CLI Help\nTo bring up the help menu simply run `rewrk --help` to produce this:\n\n```\nUSAGE:\n    rewrk.exe [FLAGS] [OPTIONS] --duration \u003cduration\u003e --host \u003chost\u003e\n\nFLAGS:\n        --help       Prints help information\n        --http2      Set the client to use http2 only. (default is http/1) e.g. '--http2'\n        --pct        Displays the percentile table after benchmarking.\n    -V, --version    Prints version information\n\nOPTIONS:\n    -c, --connections \u003cconnections\u003e    Set the amount of concurrent e.g. '-c 512' [default: 1]\n    -d, --duration \u003cduration\u003e          Set the duration of the benchmark.\n    -h, --host \u003chost\u003e                  Set the host to bench e.g. '-h http://127.0.0.1:5050'\n    -t, --threads \u003cthreads\u003e            Set the amount of threads to use e.g. '-t 12' [default: 1]\n```\n\n# Building from source\n\nBuilding from source is incredibly simple, just make sure you have a stable version of Rust installed before you start.\n\n**With Cargo Install**\n1) - Run `cargo install rewrk --git https://github.com/ChillFish8/rewrk.git`\n\n**With Cargo Run**\n1) - Clone the repo source code\n2) - Run `cargo run --release -- \u003center flags here\u003e`\n\n**With Cargo Build**\n1) - Clone the repo source code\n2) - Run `cargo build --release`\n3) - Extract the binary from the release folder\n4) - Binary ready to use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnx-search%2Frewrk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flnx-search%2Frewrk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnx-search%2Frewrk/lists"}