{"id":19610530,"url":"https://github.com/originjs/js-test-benchmark","last_synced_at":"2025-04-27T21:31:44.611Z","repository":{"id":219107048,"uuid":"748113296","full_name":"originjs/js-test-benchmark","owner":"originjs","description":"js test benchmark","archived":false,"fork":false,"pushed_at":"2024-04-24T06:33:30.000Z","size":805,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T03:41:22.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mulanpsl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/originjs.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-25T09:55:36.000Z","updated_at":"2024-04-24T06:33:33.000Z","dependencies_parsed_at":"2024-02-08T07:27:44.727Z","dependency_job_id":"3db1aad7-562b-4e2e-8039-b1dd128755a7","html_url":"https://github.com/originjs/js-test-benchmark","commit_stats":null,"previous_names":["originjs/js-test-benchmark"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/originjs%2Fjs-test-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/originjs%2Fjs-test-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/originjs%2Fjs-test-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/originjs%2Fjs-test-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/originjs","download_url":"https://codeload.github.com/originjs/js-test-benchmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251212035,"owners_count":21553394,"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-11-11T10:29:57.339Z","updated_at":"2025-04-27T21:31:43.561Z","avatar_url":"https://github.com/originjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## js-test-benchmark\r\n\r\n### Usage\r\nGenerate test cases\r\n```bash\r\nnode ./testCaseFactory/createCase.js fileCount caseCountInFile cpuSpendMillisecond ioSpendMillisecond\r\n\r\n# Generate fileCount test files (fileCount must be a multiple of 10), and generate caseCountInFile test cases in each file (caseCountInFile must be a multiple of 5).\r\n# The total number of test cases (fileCount * caseCountInFile) must be less than 100000.\r\n# Time spent of cpu simulating business functions (ms).\r\n# Time spent of io simulating business functions (ms).\r\n\r\n#Example：node ./testCaseFactory/createCase.js 100 10 500 500\r\n```\r\n\r\nRun benchmark\r\n```bash\r\npnpm install\r\npnpm run test:ben\r\n```\r\n\r\n### Output\r\nAbout [result](https://github.com/sharkdp/hyperfine/issues/443#issuecomment-964856075)\r\n\r\n| Command | Mean [s] | Min [s] | Max [s] | Relative |\r\n|:---|---:|---:|---:|---:|\r\n| `pnpm run test:jest` | 5.046 ± 0.579 | 4.685 | 5.713 | 1.47 ± 0.23 |\r\n| `pnpm run test:vitest` | 3.434 ± 0.356 | 3.124 | 3.823 | 1.00 |\r\n| `pnpm run test:jest:inline` | 5.589 ± 0.278 | 5.283 | 5.826 | 1.63 ± 0.19 |\r\n| `pnpm run test:vitest:inline` | 3.521 ± 0.418 | 3.234 | 4.001 | 1.03 ± 0.16 |\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foriginjs%2Fjs-test-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foriginjs%2Fjs-test-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foriginjs%2Fjs-test-benchmark/lists"}