{"id":26361133,"url":"https://github.com/polyseam/bencher","last_synced_at":"2025-03-16T17:20:03.680Z","repository":{"id":239240253,"uuid":"736065671","full_name":"polyseam/bencher","owner":"polyseam","description":"Benchmark CLI Performance","archived":false,"fork":false,"pushed_at":"2025-01-23T12:54:37.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T13:40:07.405Z","etag":null,"topics":[],"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/polyseam.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":"2023-12-26T22:22:56.000Z","updated_at":"2025-01-23T12:54:41.000Z","dependencies_parsed_at":"2024-05-12T13:31:12.162Z","dependency_job_id":null,"html_url":"https://github.com/polyseam/bencher","commit_stats":null,"previous_names":["polyseam/bencher"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyseam%2Fbencher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyseam%2Fbencher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyseam%2Fbencher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyseam%2Fbencher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polyseam","download_url":"https://codeload.github.com/polyseam/bencher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902708,"owners_count":20366341,"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":"2025-03-16T17:20:03.182Z","updated_at":"2025-03-16T17:20:03.674Z","avatar_url":"https://github.com/polyseam.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ch1\u003ebencher\u003c/h1\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/polyseam/bencher/actions/workflows/main-latest.yml\"\u003e\n    \u003cimg src=\"https://github.com/polyseam/bencher/actions/workflows/main-latest.yml/badge.svg\" alt=\"main\" style=\"max-width: 100%;\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Dependabot-active-brightgreen.svg\" alt=\"Dependabot Badge\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/code-size/polyseam/bencher\" alt=\"GitHub code size in bytes\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/commit-activity/w/polyseam/bencher\" alt=\"GitHub commit activity\"\u003e\n  \u003ca href=\"https://github.com/polyseam/bencher/issues\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/polyseam/bencher\" alt=\"GitHub issues\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://cndi.run/bencher-releases?utm_content=gh_badge_bencher_releases\u0026utm_campaign=bencher_readme\u0026utm_source=github.com/polyseam/bencher\u0026utm_medium=repo\u0026utm_id=5099\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/polyseam/bencher.svg?style=flat\" alt=\"GitHub Release\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://cndi.run/di?utm_content=gh_badge_bencher_discord\u0026utm_campaign=bencher_readme\u0026utm_source=github.com/polyseam/bencher\u0026utm_medium=repo\u0026utm_id=5101\"\u003e\n    \u003cimg src=\"https://img.shields.io/discord/956275914596040754.svg?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2\" alt=\"Discord\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://cndi.run/tw?utm_content=gh_badge_bencher_twitter\u0026utm_campaign=bencher_readme\u0026utm_source=github.com/polyseam/bencher\u0026utm_medium=repo\u0026utm_id=5100\"\u003e\n    \u003cimg src=\"https://img.shields.io/twitter/follow/Polyseam?label=\u0026style=social\" alt=\"Twitter\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Usage\n\nThe goal with bencher is to make it really easy to see how long a command takes\nto run, and catalog that information.\n\n```bash\nbencher -r unoptimized-echo -- echo \"hello world\"\n```\n\nThis will run `echo \"hello world\"` and store an entry in a file named\n`benchee.json` in the current directory.\n\nThe result will look like this:\n\n```jsonc\n{\n  \"unoptimized-echo\": { // the name of the ref\n    \"entries\": [\n      {\n        \"duration\": 70.764292, // in milliseconds\n        \"ts\": \"2024-05-10T20:58:27.655Z\",\n        \"bencheeCommand\": \"echo \\\"hello world\\\"\",\n        \"cwd\": \"/Users/m/optimize-echo\"\n      },\n      {\n        \"duration\": 11.11291700000001,\n        \"ts\": \"2024-05-10T20:58:33.042Z\",\n        \"bencheeCommand\": \"echo \\\"hello world\\\"\",\n        \"cwd\": \"/Users/m/optimize-echo\"\n      },\n      {\n        \"duration\": 17.802250000000015,\n        \"ts\": \"2024-05-10T20:59:29.843Z\",\n        \"bencheeCommand\": \"echo \\\"hello world\\\"\",\n        \"cwd\": \"/Users/m/optimize-echo\"\n      }\n    ],\n    \"summary\": {\n      \"mean\": 33.22648633333334,\n      \"median\": 17.802250000000015,\n      \"min\": 11.11291700000001,\n      \"max\": 70.764292,\n      \"stddev\": 26.683352296860374\n    }\n  }\n}\n```\n\nIn addition to the entries, we also compute a summary of the durations across\nall entries for a given `ref`.\n\nYou can run a number of identical tests in one ref, then make a change and run\nthe same tests in another ref, and compare the summaries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyseam%2Fbencher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyseam%2Fbencher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyseam%2Fbencher/lists"}