{"id":19501136,"url":"https://github.com/gitbookio/bipbip","last_synced_at":"2025-04-25T23:30:55.534Z","repository":{"id":33471438,"uuid":"133930764","full_name":"GitbookIO/bipbip","owner":"GitbookIO","description":"Benchmark runner for performance regression test suites","archived":false,"fork":false,"pushed_at":"2023-08-31T09:51:32.000Z","size":650,"stargazers_count":17,"open_issues_count":12,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T22:49:35.973Z","etag":null,"topics":["benchmark","node-js","performance"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/GitbookIO.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":"2018-05-18T09:07:54.000Z","updated_at":"2024-10-29T17:56:04.000Z","dependencies_parsed_at":"2024-06-18T20:11:41.908Z","dependency_job_id":null,"html_url":"https://github.com/GitbookIO/bipbip","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":0.09090909090909094,"last_synced_commit":"c5d68f10753f1ea0562dc076731234d948ac0e28"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fbipbip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fbipbip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fbipbip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fbipbip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitbookIO","download_url":"https://codeload.github.com/GitbookIO/bipbip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250912660,"owners_count":21506865,"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":["benchmark","node-js","performance"],"created_at":"2024-11-10T22:11:37.516Z","updated_at":"2025-04-25T23:30:55.191Z","avatar_url":"https://github.com/GitbookIO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `bipbip`\n\nEasy to setup, benchmark tool for Node.js. This module is inspired by [jest](https://github.com/facebook/jest).\n\n![Preview](./preview.gif)\n\nBipBip is intended to be run as a part of a performance regression test suite. It is intended to help answer questions like \"have performance characteristics changed between releases\" or \"does this change have an impact on performance?\"\n\n# Installation\n\n```\n$ npm install -g bipbip\n```\n\n# Usage\n\nCreate a file `__benchmarks__/hello.js` ([example](__benchmarks__/fibonacci.js)):\n\n```js\nsuite('Hello world', () =\u003e {\n    scenario('hello()', () =\u003e {\n        doSomething();\n    });\n\n    scenario('world()', () =\u003e {\n        doSomething();\n    })\n});\n```\n\nthen run:\n\n```\n$ bipbip\n```\n\nResults can be saved to a JSON file, to be compared later on:\n\n```\n$ bipbip --save ./results.json\n$ bipbip --compare ./results.json\n```\n\n# Benchmarks API\n\n`bipbip` defines some global variables in the executed JS files:\n\n- `suite(name: string, fn: () =\u003e void)`: define a suite of scenarios\n- `scenario(name: string, run: () =\u003e void)`: define a scenario\n\n# CLI options\n\n```\n$ bipbip \u003cfiles...\u003e [options]\n```\n\nThe command line accepts globs as arguments: `benchmark *.js`, `benchmark module1/*.js module2/*.js`\n\n| Option | Description |\n| ------ | ----------- |\n| `-s, --save [file]` | Save the results of benchmarks |\n| `-c, --compare [file]` | Compare the results to previously saved results |\n| `-d, --duration [ms]` | Maximum duration of each scenario (default is 5sec) |\n| `-e, --executions [count]` | Maximum executions per scenario (default is 1M) |\n\n# Usage in a CI\n\nWhen using `bipbip` in a CI service (like Travis), the results can be preserved in the  [CI cache](https://docs.travis-ci.com/user/caching/#Fetching-and-storing-caches).\n\n```yaml\njobs:\n  include:\n    - if: branch = master\n      script:\n        - bipbip --save .cache/benchmarks.json --compare .cache/benchmarks.json\n    - if: branch != master\n      script:\n        - bipbip --compare .cache/benchmarks.json\n```\n\n# Usage with babel\n\nWhen running benchmarks on JS files not compiled for the current node version. You can run the benchmark CLI using `babel-node`:\n\n```\n$ babel-node node_modules/.bin/bipbip\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fbipbip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitbookio%2Fbipbip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fbipbip/lists"}