{"id":21091310,"url":"https://github.com/lyouthzzz/websocket-benchmark-cli","last_synced_at":"2026-02-15T21:31:16.410Z","repository":{"id":62867086,"uuid":"560759980","full_name":"lyouthzzz/websocket-benchmark-cli","owner":"lyouthzzz","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-23T10:26:14.000Z","size":21,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-16T13:44:49.652Z","etag":null,"topics":["benchmark","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyouthzzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-02T07:49:26.000Z","updated_at":"2023-08-08T11:19:56.000Z","dependencies_parsed_at":"2023-01-22T08:16:16.689Z","dependency_job_id":null,"html_url":"https://github.com/lyouthzzz/websocket-benchmark-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lyouthzzz/websocket-benchmark-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyouthzzz%2Fwebsocket-benchmark-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyouthzzz%2Fwebsocket-benchmark-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyouthzzz%2Fwebsocket-benchmark-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyouthzzz%2Fwebsocket-benchmark-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyouthzzz","download_url":"https://codeload.github.com/lyouthzzz/websocket-benchmark-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyouthzzz%2Fwebsocket-benchmark-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29490256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","websocket"],"created_at":"2024-11-19T21:45:00.218Z","updated_at":"2026-02-15T21:31:16.394Z","avatar_url":"https://github.com/lyouthzzz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# websocket-benchmark-cli\n\n- 支持连接压测\n- 支持IO吞吐压测\n\n## install\n```bash\ngo get github.com/lyouthzzz/websocket-benchmark-cli@main\n```\n\n## websocket-benchmark-cli\n```bash\nwebsocket-benchmark-cli -h\nNAME:\n   websocket-benchmark-cli - websocket benchmark tool\n\nUSAGE:\n   websocket-benchmark-cli [global options] command [command options] [arguments...]\n\nVERSION:\n   v1.0.1\n\nCOMMANDS:\n   conn     websocket connection benchmark\n   message  websocket message benchmark\n   help, h  Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --host value             (default: \"localhost:8080\")\n   --path value             (default: \"/ws\")\n   --user value             (default: 500)\n   --connectInterval value  (default: \"20ms\")\n   --help, -h               show help (default: false)\n   --version, -v            print the version (default: false)\n```\n\n### 全局参数\n- host: websocket服务host\n- path: websocket路径\n- user: 用户连接数量\n- connectInterval: 连接间隔\n\n## 连接压测\n\n#### command\n```bash\nwebsocket-benchmark-cli conn -h\nNAME:\n   websocket-benchmark-cli conn - websocket connection benchmark\n\nUSAGE:\n   websocket-benchmark-cli conn [command options] [arguments...]\n\nOPTIONS:\n   --host value             (default: \"localhost:8080\")\n   --path value             (default: \"/ws\")\n   --user value             (default: 500)\n   --connectInterval value  (default: \"20ms\")\n   \n   --sleep value            (default: \"60m\")\n   --help, -h               show help (default: false)\n```\n\n- sleep：连接保持时间\n\n#### example\n```\nwebsocket-benchmark-cli conn --host localhost:8888 --connectInterval 30ms --user 10000 --sleep 1h\n```\n\n## 消息吞吐压测\n\n#### command\n```bash\nwebsocket-benchmark-cli message -h\nNAME:\n   websocket-benchmark-cli message - websocket message benchmark\n\nUSAGE:\n   websocket-benchmark-cli message [command options] [arguments...]\n\nOPTIONS:\n   --host value             (default: \"localhost:8080\")\n   --path value             (default: \"/ws\")\n   --user value             (default: 500)\n   --connectInterval value  (default: \"20ms\")\n   \n   --content value          (default: \"hello world\")\n   --file value             \n   --interval value         (default: \"1s\")\n   --times value            (default: 100)\n   --help, -h               show help (default: false)\n```\n\n- content：发送的消息主体\n- file：读取的文件作为发送的消息主体，适合大文件\n- interval：发送消息的间隔\n- times：发送消息的总次数\n\n#### example\n```bash\nwebsocket-benchmark-cli message --host localhost:8888 --connectInterval 30ms --user 1000 --content messagebody\n```\n\n\n### todo\n- report指标","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyouthzzz%2Fwebsocket-benchmark-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyouthzzz%2Fwebsocket-benchmark-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyouthzzz%2Fwebsocket-benchmark-cli/lists"}