{"id":45601168,"url":"https://github.com/lvl99/barbell","last_synced_at":"2026-02-23T14:39:42.739Z","repository":{"id":44936768,"uuid":"158720144","full_name":"lvl99/barbell","owner":"lvl99","description":"Easily benchmark your JS code's performance via CLI using similar (but different) interface to Jest.","archived":false,"fork":false,"pushed_at":"2023-01-08T21:51:50.000Z","size":1298,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T02:23:43.073Z","etag":null,"topics":["benchmark","optimise","optimize","performance","test","testing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lvl99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-22T15:40:39.000Z","updated_at":"2023-01-08T21:51:55.000Z","dependencies_parsed_at":"2023-01-11T15:38:30.301Z","dependency_job_id":null,"html_url":"https://github.com/lvl99/barbell","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/lvl99/barbell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvl99%2Fbarbell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvl99%2Fbarbell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvl99%2Fbarbell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvl99%2Fbarbell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lvl99","download_url":"https://codeload.github.com/lvl99/barbell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvl99%2Fbarbell/sbom","scorecard":{"id":606339,"data":{"date":"2025-08-11","repo":{"name":"github.com/lvl99/barbell","commit":"f8b643b7f466b93ec6f64ff8a25c6be39112a994"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"18 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-7jxr-cg7f-gpgv","Warn: Project is vulnerable to: GHSA-xj72-wvfv-8985","Warn: Project is vulnerable to: GHSA-ch3r-j5x3-6q2m","Warn: Project is vulnerable to: GHSA-p5gc-c584-jj6v","Warn: Project is vulnerable to: GHSA-whpj-8f3w-67p5","Warn: Project is vulnerable to: GHSA-cchq-frgv-rjh5","Warn: Project is vulnerable to: GHSA-g644-9gfx-q4q4","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T01:41:27.744Z","repository_id":44936768,"created_at":"2025-08-21T01:41:27.744Z","updated_at":"2025-08-21T01:41:27.744Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29745857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","optimise","optimize","performance","test","testing"],"created_at":"2026-02-23T14:39:40.484Z","updated_at":"2026-02-23T14:39:42.729Z","avatar_url":"https://github.com/lvl99.png","language":"TypeScript","readme":"# 🏋️‍ Barbell 🏋️‍♀️\n\nEasily benchmark your code's performance via CLI using similar (but different) interface to Jest.\n\nUses [Benchmark JS](https://benchmarkjs.com/) under the hood.\n\n## Why?\n\nI wanted something like Jest but for performance testing:\n\n- It's good to test how performant your code is within an isolated JS environment.\n- Helps developers to be aware of how slow/fast their code is.\n- Set expectations on code performance to see if your code meets them (see [v0.2.0 To do](https://github.com/lvl99/barbell/projects/1)).\n\n\u003e **Note:** Barbell performs tests within a Node.JS environment, not within a browser. If you want to test within a browser, use [Benchmark JS](https://benchmarkjs.com/) or [jsPerf](https://jsperf.com/) (see [v0.2.0 To do](https://github.com/lvl99/barbell/projects/1)).\n\n## Installation\n\n```sh\n# npm\nnpm i barbell --save-dev\n\n# yarn\nyarn add barbell --dev\n```\n\n## Usage\n\nCreate `\u003cfilename\u003e.bench.js` files within your codebase (if you like you can put it in a `__benches__` directory too).\n\nEach bench file can contain benchmark test suites and individual tests. Think of a suite as a group of tests that you want to compare, whereas a single stand-alone test would just be for getting an idea of its performance.\n\n```javascript\n// __benches__/example.bench.js\n\nconst functionToTest = (...inputs) =\u003e {\n  return inputs.reduce((acc, input) =\u003e acc + input, 0);\n};\n\nsuite(\"some code I want to test\", () =\u003e {\n  test(\"test variant #1\", () =\u003e {\n    functionToTest(1, 2);\n  });\n\n  test(\"test variant #2\", () =\u003e {\n    functionToTest(1, 2, 4, 8, 16, 32);\n  });\n\n  test(\"test variant #3\", () =\u003e {\n    functionToTest(1000000, 2000000, 3000000, 4000000, 5000000);\n  });\n});\n```\n\nThen run `barbell` (or `npx barbell`) in your terminal to see your results:\n\n![Barbell in action](//unpkg.com/barbell@0.1.3/screenshot.gif)\n\n## CLI options\n\nThere are some configuration options available on the CLI:\n\n```\n\u003e barbell -h\nUsage: barbell [testMatch...] [options]\n\nOptions:\n  -V, --version                       output the version number\n  -c, --config \u003cpath\u003e                 Set path to config file\n  -t, --test-match \u003cglobPatterns...\u003e  Set the test match glob(s) to detect\n                                      benchmark tests or test file paths\n                                      (default: [\n                                        \"**/__benches__/**/*(.bench)?.[tj]s\",\n                                        \"**/*.bench.[tj]s\"\n                                      ])\n  -e, --exclude \u003cglobPatterns...\u003e     Exclude specific files and folders\n                                      (default: [\"**/node_modules/**/*\"])\n  -C, --concurrent                    The number of benches you want to run\n                                      at the same time\n                                      (default: 2)\n  -x, --stop-on-errors                Stop Barbell if any errors are found\n                                      within test suites\n                                      (default: false)\n  -v, --verbose                       Verbose mode (outputs config settings)\n                                      (default: false)\n  -r, --runner \u003cnameOrPath\u003e           Name or path to test runner\n                                      (default: barbell-runner)\n  -R, --reporter \u003cnameOrPath\u003e         Name or path to test reporter\n                                      (default: barbell-reporter)\n  -h, --help                          output usage information\n```\n\n### Examples\n\n\u003e Note: always wrap globs with quote marks!\n\n```bash\n# Find and run test suite files with default config\n\u003e barbell \"**/__benches__/**/*.bench.js\"\n\n# Specify multiple test match glob patterns\n\u003e barbell -t \"**/__benches__/**.*.bench.js\" -t \"**/__tests__/**/*.bench.js\"\n\n# Run a single test file with default config\n\u003e barbell \"./__benches__/example.bench.js\"\n\n# Specify a config file\n\u003e barbell -c \"./barbell.config.js\"\n```\n\n## Configuration\n\nAside from the CLI options, you can also configure via an external `barbell.config.*` file (supported file formats are `js`, `json`, `yml` and `yaml`).\n\nBarbell will automatically detect and use the `barbell.config.*` file that's in the current working directory, unless you specify a specific path to another.\n\n```javascript\nmodule.exports = {\n  // The root directory where barbell is running the benches\n  rootDir: process.cwd(),\n\n  // The glob patterns to find bench files or specific bench files to run\n  // See npm module `glob` for more info\n  testMatch: [\"**/__benches__/**/*(.bench)?.[tj]s\", \"**/*.bench.[tj]s\"],\n\n  // Glob patterns or paths of files/folders to exclude from running\n  // See npm module `glob`'s option `exclude` for more info\n  exclude: [\"**/node_modules/**/*\"],\n\n  // The maximum number of benches to run at the same time\n  concurrent: 2,\n\n  // Stop barbell if any errors in test suites occur\n  stopOnErrors: false,\n\n  // Verbose mode (outputs config settings)\n  verbose: false,\n\n  // Advanced: the package name, script path or custom function to run bench files with\n  // See ./lib/runner.ts for more info\n  runner: \"barbell-runner\",\n\n  // Advanced: the package name, script path or custom function to output a report\n  // See ./lib/reporter.ts for more info\n  reporter: \"barbell-reporter\",\n\n  // Advanced: extra configuration for the reporter.\n  // See ./lib/reporter.ts for more info\n  reporterConfig: {},\n};\n```\n\n## Development\n\nTo download external dependencies:\n\n```bash\n  npm i\n```\n\nTo run tests (using Jest):\n\n```bash\n  npm run test\n```\n\nTo run benchmark tests:\n\n```bash\n  npm run bench\n```\n\n## Contribute\n\nHave suggestions, questions or feedback? Found a bug? [Post an issue](https://github.com/lvl99/barbell/issues)\nAdded a feature? Fixed a bug? Wrote some much needed tests? [Post a PR](https://github.com/lvl99/barbell/compare)\n\n## License\n\n[Apache-2.0](LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvl99%2Fbarbell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flvl99%2Fbarbell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvl99%2Fbarbell/lists"}