{"id":16185495,"url":"https://github.com/patrickhulce/node-siegem","last_synced_at":"2025-04-07T13:15:38.166Z","repository":{"id":57359209,"uuid":"61676187","full_name":"patrickhulce/node-siegem","owner":"patrickhulce","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-10T02:47:26.000Z","size":319,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-19T00:51:16.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/patrickhulce.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-22T00:21:32.000Z","updated_at":"2023-08-09T00:35:53.000Z","dependencies_parsed_at":"2024-11-03T00:01:55.706Z","dependency_job_id":null,"html_url":"https://github.com/patrickhulce/node-siegem","commit_stats":{"total_commits":43,"total_committers":3,"mean_commits":"14.333333333333334","dds":0.2325581395348837,"last_synced_commit":"0a5c2d124eb5920ac732bfa7f8c01b4d0175efe9"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickhulce%2Fnode-siegem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickhulce%2Fnode-siegem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickhulce%2Fnode-siegem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickhulce%2Fnode-siegem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickhulce","download_url":"https://codeload.github.com/patrickhulce/node-siegem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657266,"owners_count":20974345,"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-10-10T07:14:27.425Z","updated_at":"2025-04-07T13:15:38.147Z","avatar_url":"https://github.com/patrickhulce.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SIEGE iMproved\n\nA _mostly_ API-compatible node implementation of the fantastic siege command-line utility for benchmarking and stress testing servers. Improvements include enhanced granularity for request timing, simplified POST/PUT/DELETE usage (inspired by curl), and easy-to-use programmatic API.\n\n## Installation\n\n```sh\n$ npm install -g siegem\n```\n\n## Usage\n\n```sh\n$ siegem --help\n```\n\n## Examples\n\n### Quick Benchmark\n\nContinuously hit `/ping` with 100 concurrent users 100 times each (will request 10000 times and then stop).\n\n```sh\n$ siegem -c 100 -d0 -r 100 http://localhost:3000/ping\n```\n\n### Long Benchmark\n\nFor 15 minutes, hit `/test` with 50 concurrent users that wait up to 5 seconds before requesting again.\n\n```sh\n$ siegem -c 50 -d 5000 -t 15m http://localhost:3000/test\n```\n\n### PUT Some Data\n\n```sh\n$ siegem -c 5 -X PUT -H 'Content-Type: application/json' --data '{\"foo\": \"bar\"}' http://localhost:3000/something\n```\n\n### POST A Lot of Data\n\n```sh\n$ siegem -c 5 -X POST -H 'Content-Type: application/json' --data @my_file.json http://localhost:3000/something\n```\n\n### Hammer Lots of Endpoints\n\n```sh\n$ siegem -c 100 --chaotic --file my_urls.txt\n```\n\n#### `my_urls.txt`\n\n```\nhttp://google.com/\nhttp://facebook.com/\n-X HEAD http://twitter.com/\n-X HEAD http://yahoo.com/\n-X POST -H 'if-none-match: etag123' http://mysite.com/foo\n-X DELETE http://mysite.com/other-stuff\n-X PUT -H 'content-type: application/json' --data @/var/stuff/my_stuff/data.json http://mysite.com/lots-of-data\n```\n\n### POST Data with Dependencies\n\n```sh\n$ siegem --file my_urls.txt\n```\n\n#### `my_urls.txt`\n\n1. Label a URL's response by prefixing the line with a variable name beginning with $. (`$msg` in the example below)\n2. In a later line, reference a previous response using `%%\u003cname\u003e\u003cspecifier\u003e%%`.\n   1. `@\u003cproperty\u003e` - Specify a JSON property path.\n   2. `/\u003cregex\u003e` - Specify a regex to extract.\n\n```\n$msg -X POST --data '{\"message\": \"foo\"}' http://localhost:3000/messages\n-X GET 'http://localhost:3000/messages/%%msg@id%%'\n-X PUT --data '{\"message\": \"%%msg/.*%%\"}' 'http://localhost:3000/messages/%%msg@id%%'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickhulce%2Fnode-siegem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickhulce%2Fnode-siegem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickhulce%2Fnode-siegem/lists"}