{"id":20165561,"url":"https://github.com/skippia/js-benchmark-builder","last_synced_at":"2025-03-03T03:24:00.361Z","repository":{"id":255929933,"uuid":"849363152","full_name":"Skippia/js-benchmark-builder","owner":"Skippia","description":"Comparison different JS frameworks / runtimes in couple usecases scaffolding web server dynamically from CLI","archived":false,"fork":false,"pushed_at":"2024-10-11T14:42:01.000Z","size":578,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T14:52:36.464Z","etag":null,"topics":["abstract-server","bun-benchmark","dynamic-transport","express-benchmark","fastify-benchmark","heavy-blocking","heavy-non-blocking","javascript-performance","nodejs-benchmark","performance","pg-pool-create-user","pg-pool-get-user","redis-create-user","redis-get-user","uws-benchmark"],"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/Skippia.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-08-29T13:12:53.000Z","updated_at":"2024-10-11T14:42:05.000Z","dependencies_parsed_at":"2024-11-14T00:38:11.595Z","dependency_job_id":"f1b055c5-0214-4d92-ab02-cef3ab230517","html_url":"https://github.com/Skippia/js-benchmark-builder","commit_stats":null,"previous_names":["skippia/benchmark-js-playground","skippia/js-benchmark-builder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skippia%2Fjs-benchmark-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skippia%2Fjs-benchmark-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skippia%2Fjs-benchmark-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skippia%2Fjs-benchmark-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skippia","download_url":"https://codeload.github.com/Skippia/js-benchmark-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241601602,"owners_count":19988924,"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":["abstract-server","bun-benchmark","dynamic-transport","express-benchmark","fastify-benchmark","heavy-blocking","heavy-non-blocking","javascript-performance","nodejs-benchmark","performance","pg-pool-create-user","pg-pool-get-user","redis-create-user","redis-get-user","uws-benchmark"],"created_at":"2024-11-14T00:38:17.212Z","updated_at":"2025-03-03T03:24:00.341Z","avatar_url":"https://github.com/Skippia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Benchmark playground\n\n## Description\n\nThis repository is devoted benchamarking different JS (frameworks / runtimes) a.k.a \"transports\" in different usecases building web-server dynamically in runtime based on CLI.\n\nThese transports are:\n  - Node.js (v20)\n  - Bun (v1.1.26)\n  - Express.js (v4.19.2)\n  - Fastify (v4.28.1)\n  - uWebSockets (v20.48.0)\n\nThese usecases are:\n  - Empty request\n  - Heavy non-blocking request (setTimeout)\n  - Heavy blocking request (heavy CPU-bound)\n  - Pg-pool create user request\n  - Pg-pool get user request\n  - Redis create user request\n  - Redis get user request\n\n## Features\n\n- dynamic scaffolding web-server based on CLI (transport + usecase)\n- dynamic scaffolding benchmark test based on CLI ()\n## How it works?\n\n### Class diagram\n\n### Sequency diagram\n\n## Usage\n\n### Manual mode\n\nIn this mode you should separately run web server and benchmark usecase. For example:\n1. Run web server:\n```bash\nnpm run server -- -t node -u empty\n```\nSupported flags for manual benchmark running:\n- u — usecase (*)\n- t — transport (*)\n\n2. Run benchmark:\n```bash\nnpm run benchmark:manual -- -u empty -c 100 -p 1 -w 3 -d 60\n```\n\nSupported flags for manual benchmark running:\n- u — usecase (*)\n- c — connections\n- p — pipelining factor\n- w — workers\n- d — duration\n\nor\n```bash\nautocannon http://localhost:3001/empty -d 30 -c 100 -w 3\n```\n\nSuch mode will produce benchmark result only in terminal for specific usecase.\n\n### Automatic mode\n\nIn this mode you should run only one script which under the hood will test all usecases running them on each transport (you change config at `src/benchmark/automate-config.ts`):\n\nRun automate script:\n```bash\nnpm run benchmark:automate\n```\n\nSuch mode will produce benchmark result in new file `/benchmarks-data/benchmark-${last-snapshot}.json` and create / upgrade `benchmark-summary.md` file which will contain comparison table based on last snapshot json file.\n\n## Benchmark results\n\n- To check \"raw\" data check `/benchmarks-data/benchmark-${last-snapshot}.json` (each new run of benchmark generates new json file with result)\n- To check summary data of last benchmark (comparison table) check `benchmark-summary.md` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskippia%2Fjs-benchmark-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskippia%2Fjs-benchmark-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskippia%2Fjs-benchmark-builder/lists"}