{"id":19635491,"url":"https://github.com/henrygd/async-queue-wrangler-benchmark","last_synced_at":"2025-08-27T14:05:22.974Z","repository":{"id":244593585,"uuid":"815694841","full_name":"henrygd/async-queue-wrangler-benchmark","owner":"henrygd","description":"Benchmark of popular async job queue libraries in workerd","archived":false,"fork":false,"pushed_at":"2024-06-24T20:09:50.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T06:43:37.087Z","etag":null,"topics":["cloudflare-workers","workerd"],"latest_commit_sha":null,"homepage":"","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/henrygd.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":"2024-06-15T21:30:43.000Z","updated_at":"2024-06-27T16:54:19.000Z","dependencies_parsed_at":"2024-06-24T21:47:06.690Z","dependency_job_id":null,"html_url":"https://github.com/henrygd/async-queue-wrangler-benchmark","commit_stats":null,"previous_names":["henrygd/async-queue-wrangler-benchmark"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrygd%2Fasync-queue-wrangler-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrygd%2Fasync-queue-wrangler-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrygd%2Fasync-queue-wrangler-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrygd%2Fasync-queue-wrangler-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henrygd","download_url":"https://codeload.github.com/henrygd/async-queue-wrangler-benchmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240941484,"owners_count":19882062,"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":["cloudflare-workers","workerd"],"created_at":"2024-11-11T12:25:33.919Z","updated_at":"2025-02-26T21:41:52.299Z","avatar_url":"https://github.com/henrygd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### About\n\nBenchmark of popular async queue libraries (and also mine) in workerd.\n\nAll libraries run the exact same test, so `promise-queue` and `p-limit` are not penalized by having to use `Promise.all` (they don't provide a promise that resolves when the queue is empty).\n\n### Results\n\n| Library                                                         | Requests/sec | Total (sec) | Average | Slowest |\n| :-------------------------------------------------------------- | :----------- | :---------- | :------ | :------ |\n| [@henrygd/queue](https://github.com/henrygd/queue)              | 816.1074     | 1.2253      | 0.0602  | 0.0864  |\n| [promise-queue](https://github.com/promise-queue/promise-queue) | 647.2809     | 1.5449      | 0.0759  | 0.1149  |\n| [fastq](https://github.com/mcollina/fastq)                      | 336.7031     | 3.0877      | 0.1459  | 0.2080  |\n| [async.queue](https://github.com/caolan/async)                  | 198.9986     | 5.0252      | 0.2468  | 0.3544  |\n| [queue](https://github.com/jessetane/queue)                     | 85.6483      | 11.6757     | 0.5732  | 0.7629  |\n| [p-limit](https://github.com/sindresorhus/p-limit)              | 77.7434      | 12.8628     | 0.6316  | 0.9585  |\n\n### Start server\n\n```bash\npnpm i \u0026\u0026 pnpm dev\n```\n\n### Benchmark\n\nSends 100 requests to warm up the server, then 1000 requests to benchmark using [oha](https://github.com/hatoo/oha).\n\nChanging the warm up path doesn't make a difference. It compiles to a single file and each test is standalone. I tested with fastq and got a longer time, so warm up is left on henrygd-queue to have a more uniform warm up time.\n\n```bash\n# @henrygd/queue\noha --no-tui -n 100 http://localhost:8787/henrygd-queue \u003e /dev/null \u0026\u0026 oha -n 1000 http://localhost:8787/henrygd-queue\n# promise-queue\noha --no-tui -n 100 http://localhost:8787/henrygd-queue \u003e /dev/null \u0026\u0026 oha -n 1000 http://localhost:8787/promise-queue\n# async.queue\noha --no-tui -n 100 http://localhost:8787/henrygd-queue \u003e /dev/null \u0026\u0026 oha -n 1000 http://localhost:8787/async-queue\n# fastq\noha --no-tui -n 100 http://localhost:8787/henrygd-queue \u003e /dev/null \u0026\u0026 oha -n 1000 http://localhost:8787/fastq\n# queue\noha --no-tui -n 100 http://localhost:8787/henrygd-queue \u003e /dev/null \u0026\u0026 oha -n 1000 http://localhost:8787/queue\n# p-limit\noha --no-tui -n 100 http://localhost:8787/henrygd-queue \u003e /dev/null \u0026\u0026 oha -n 1000 http://localhost:8787/p-limit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrygd%2Fasync-queue-wrangler-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenrygd%2Fasync-queue-wrangler-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrygd%2Fasync-queue-wrangler-benchmark/lists"}