{"id":15653080,"url":"https://github.com/healeycodes/websocket-benchmarker","last_synced_at":"2025-04-30T21:09:44.495Z","repository":{"id":112378238,"uuid":"167689541","full_name":"healeycodes/websocket-benchmarker","owner":"healeycodes","description":"Benchmark a WebSocket server's message throughput ⌛","archived":false,"fork":false,"pushed_at":"2019-03-27T20:27:20.000Z","size":216,"stargazers_count":30,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-30T10:27:18.968Z","etag":null,"topics":["benchmark","python","websockets"],"latest_commit_sha":null,"homepage":"","language":"Python","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/healeycodes.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}},"created_at":"2019-01-26T13:04:41.000Z","updated_at":"2024-04-02T15:05:53.000Z","dependencies_parsed_at":"2023-05-14T04:00:43.938Z","dependency_job_id":null,"html_url":"https://github.com/healeycodes/websocket-benchmarker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fwebsocket-benchmarker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fwebsocket-benchmarker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fwebsocket-benchmarker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/healeycodes%2Fwebsocket-benchmarker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/healeycodes","download_url":"https://codeload.github.com/healeycodes/websocket-benchmarker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229089206,"owners_count":18018383,"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","python","websockets"],"created_at":"2024-10-03T12:44:38.518Z","updated_at":"2024-12-10T15:36:56.955Z","avatar_url":"https://github.com/healeycodes.png","language":"Python","readme":"[![Build Status](https://travis-ci.org/healeycodes/websocket-benchmarker.svg?branch=master)](https://travis-ci.org/healeycodes/websocket-benchmarker)\n\n## :radio: WebSocket Benchmarker :watch:\n\n*Message throughput* is how fast a WebSocket server can parse and respond to a message. Some people consider this to be a good reference of a framework/library/server's performance. This tool measures the message throughput under load by mocking concurrent clients.\n\n\u003cbr\u003e\n\n![](https://github.com/healeycodes/websocket-benchmarker/blob/master/images/header.png)\n\n\u003cbr\u003e\n\n---\n\n###### 2019.01.26\n\nNow with 100% more bleeding edge :zap: [asyncio](https://docs.python.org/3/library/asyncio.html) goodness.\n\n---\n\n\u003cbr\u003e\n\n### Installation\n\nPython 3.6.5+.\n\n`pip install -r requirements.txt`\n\n\u003cbr\u003e\n\n### Usage\n\nThis program expects the host to be an echo server and measures the time between sending a message and recieving the same message back from the host. It performs this for a number of client connections simultaneously and is designed to produce repeatable results.\n\n`python bench.py` will launch the benchmark and print statistics to stdout. If the log file path is to a non-file then one will be created otherwise results will be appended to the existing file.\n\nThe raw results are in CSV format with each line representing a client's roundtrip times.\n\nE.g., `0.1, 0.1, 0.1` for one client performing three roundtrips.\n\n\u003cbr\u003e\n\n| Arg   | Description                            | Default         |\n| ----- |:---------------------------------------|:----------------|\n| `--h` | Host address of WebSocket server       | `localhost:3000`|\n| `--n` | Number of clients to create            | `1000`          |\n| `--c` | Number of concurrent clients           | `64`            |\n| `--r` | Roundtrips per client                  | `5`             |\n| `--s` | Message size in characters             | `30`            |\n| `--l` | Path to create or append to a log file | `./log.txt`     |\n\n\u003cbr\u003e\n\n### Tests\n\nFull end-to-end testing via unittest.\n\n```\npython -m unittest\n...\n----------------------------------------------------------------------\nRan 3 tests in 8.371s\n\nOK\n```\n\n\u003cbr\u003e\n\n### License\n\nMIT (c) 2019 healeycodes.\n\nInspiration taken from the unmaintained JavaScript project [websocket-benchmark](https://github.com/cargomedia/websocket-benchmark).\n","funding_links":[],"categories":["Tools per Language"],"sub_categories":["Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fwebsocket-benchmarker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhealeycodes%2Fwebsocket-benchmarker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhealeycodes%2Fwebsocket-benchmarker/lists"}