{"id":19007408,"url":"https://github.com/cnlh/benchmark","last_synced_at":"2026-03-11T15:35:41.540Z","repository":{"id":54682688,"uuid":"251463896","full_name":"cnlh/benchmark","owner":"cnlh","description":"a simple benchmark testing tool implemented in golang with some small features","archived":false,"fork":false,"pushed_at":"2023-09-28T19:50:31.000Z","size":34,"stargazers_count":57,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T18:11:15.444Z","etag":null,"topics":["benchmark","http","test"],"latest_commit_sha":null,"homepage":"","language":"Go","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/cnlh.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":"2020-03-31T00:51:28.000Z","updated_at":"2025-03-12T07:58:07.000Z","dependencies_parsed_at":"2024-06-19T00:23:57.680Z","dependency_job_id":"afb1966a-d3d1-464d-af01-23db09e92c99","html_url":"https://github.com/cnlh/benchmark","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnlh%2Fbenchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnlh%2Fbenchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnlh%2Fbenchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cnlh%2Fbenchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cnlh","download_url":"https://codeload.github.com/cnlh/benchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249297722,"owners_count":21246464,"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","test"],"created_at":"2024-11-08T18:37:17.223Z","updated_at":"2026-03-11T15:35:41.510Z","avatar_url":"https://github.com/cnlh.png","language":"Go","readme":"# Benchmark\nA simple benchmark testing tool implemented in golang, the basic functions refer to wrk and ab, added some small features based on personal needs.\n\n![Build](https://github.com/cnlh/benchmark/workflows/Build/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/cnlh/benchmark)](https://goreportcard.com/report/github.com/cnlh/benchmark)\n## Why use Benchmark?\n- http and socks5 proxy support\n- good performance as wrk(some implements in golang not work well)\n- simple code, easy to change\n## Building\n\n```shell script\ngo get github.com/cnlh/benchmark\n```\n## Usage\n\nbasic usage is quite simple:\n```shell script\nbenchmark [flags] url\n```\n\nwith the flags being\n```shell script\n    -b string\n      \tthe body of request\n    -c int\n      \tthe number of connection (default 1000)\n    -cpu int\n      \tthe number of cpu used\n    -h string\n      \trequest header, split by \\r\\n\n    -host string\n      \tthe host of request\n    -m string\n      \trequest method (default \"GET\")\n    -n int\n      \tthe number of request (default 100000)\n    -t int\n      \trequest/socket timeout in ms (default 3000)\n    -proxy string\n    \tproxy of request\n    -proxy-transport string\n        proxy transport of request, \"tcp\" or \"quic\" (default \"tcp\")\n    -quic-protocol string\n        tls application protocol of quic transport (default \"h3\")\n```\nfor example\n```shell script\nbenchmark -c 1100 -n 1000000  http://127.0.0.1/\nbenchmark -c 1100 -n 1000000 -proxy http://111:222@127.0.0.1:1235 http://127.0.0.1/\nbenchmark -c 1100 -n 1000000 -proxy socks5://111:222@127.0.0.1:1235 http://127.0.0.1/\nbenchmark -c 1100 -n 1000000 -h \"Connection: close\\r\\nCache-Control: no-cache\" http://127.0.0.1/\n```\n\n## Example Output\n```shell script\nRunning 1000000 test @ 127.0.0.1:80 by 1100 connections\nRequset as following format:\n\nGET / HTTP/1.1\nHost: 127.0.0.1:80\n\n1000000 requests in 5.73s, 4.01GB read, 33.42MB write\nRequests/sec: 174420.54\nTransfer/sec: 721.21MB\nError       : 0\nPercentage of the requests served within a certain time (ms)\n    50%\t\t\t\t5\n    65%\t\t\t\t6\n    75%\t\t\t\t7\n    80%\t\t\t\t7\n    90%\t\t\t\t9\n    95%\t\t\t\t13\n    98%\t\t\t\t19\n    99%\t\t\t\t23\n   100%\t\t\t\t107\n```\n\n## Known Issues\n- Consumes more cpu when testing short connections","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnlh%2Fbenchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcnlh%2Fbenchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcnlh%2Fbenchmark/lists"}