{"id":25332668,"url":"https://github.com/pjbgf/benchr","last_synced_at":"2025-04-08T07:55:09.204Z","repository":{"id":275257155,"uuid":"909093223","full_name":"pjbgf/benchr","owner":"pjbgf","description":"Run Go benchmarks across multiple versions of your project, with automated chart generation.","archived":false,"fork":false,"pushed_at":"2025-03-13T07:40:19.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T08:31:30.935Z","etag":null,"topics":["benchmark-charts","benchmarks","go-benchmarking","performance-visualization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pjbgf.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-12-27T17:57:31.000Z","updated_at":"2025-03-13T07:40:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"5c6d8c8b-0324-426e-8d70-f9ab715d886a","html_url":"https://github.com/pjbgf/benchr","commit_stats":null,"previous_names":["pjbgf/benchr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjbgf%2Fbenchr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjbgf%2Fbenchr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjbgf%2Fbenchr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjbgf%2Fbenchr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pjbgf","download_url":"https://codeload.github.com/pjbgf/benchr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801172,"owners_count":20998331,"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-charts","benchmarks","go-benchmarking","performance-visualization"],"created_at":"2025-02-14T04:53:04.713Z","updated_at":"2025-04-08T07:55:09.198Z","avatar_url":"https://github.com/pjbgf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# benchr\n\n**benchr** is a command-line tool designed to run a set of Go benchmark tests across different versions of the target project, generating charts with the trends over time. It is ideal for developers looking to measure performance regressions or improvements across different versions of their projects.\n\n## Key Features\n\n- **Version Comparison:** Run benchmarks for specified versions of a system under test.\n- **Automated Chart Generation:** Visualize benchmark results with an easy-to-understand plot.\n- **Lightweight and Simple:** No additional dependencies required for chart generation or version management.\n\n## Installation\n\nUse `go install`:\n```bash\ngo install github.com/pjbgf/benchr/cmd/benchr@latest\n```\n\n## Usage\n\n### Basic Command Structure\n\n```bash\nbenchr -path \u003cpath_to_benchmarks\u003e -target \u003ctarget_dependency\u003e -versions \u003cversion1,version2,...\u003e [options]\n```\n\n### Example\n\nLet’s say the system under test is `go-git`. You want to benchmark versions\n`v5.10.0`, `v5.11.0`, and `v5.12.0` and generate charts for both `ns/op` and\n`allocs/op`. The [benchmark tests](example/bench_test.go) used can be found\nin the [example](example) dir.\n\n```bash\n$ benchr -path ./example -target github.com/go-git/go-git/v5 -versions v5.10.0,v5.11.0,v5.12.0 -allocs build/allocs.html -ns build/ns.html\n\n2024/12/28 09:00:16 INFO start benchmark ref=v5.10.0\ngoos: linux\ngoarch: amd64\npkg: github.com/pjbgf/bench/example\ncpu: AMD Ryzen 7 PRO 8840HS w/ Radeon 780M Graphics\nBenchmarkPlainOpen-16    \t  112645\t     10288 ns/op\t    2880 B/op\t      44 allocs/op\nBenchmarkStatus-16       \t      44\t  26230576 ns/op\t23604316 B/op\t  100049 allocs/op\nPASS\nok  \tgithub.com/pjbgf/bench/example\t5.012s\n2024/12/28 09:00:21 INFO start benchmark ref=v5.11.0\ngoos: linux\ngoarch: amd64\npkg: github.com/pjbgf/bench/example\ncpu: AMD Ryzen 7 PRO 8840HS w/ Radeon 780M Graphics\nBenchmarkPlainOpen-16    \t  116508\t     10189 ns/op\t    2912 B/op\t      44 allocs/op\nBenchmarkStatus-16       \t      39\t  25752164 ns/op\t23610350 B/op\t  100060 allocs/op\nPASS\nok  \tgithub.com/pjbgf/bench/example\t4.610s\n2024/12/28 09:00:26 INFO start benchmark ref=v5.12.0\ngoos: linux\ngoarch: amd64\npkg: github.com/pjbgf/bench/example\ncpu: AMD Ryzen 7 PRO 8840HS w/ Radeon 780M Graphics\nBenchmarkPlainOpen-16    \t  115477\t     10359 ns/op\t    2912 B/op\t      44 allocs/op\nBenchmarkStatus-16       \t      50\t  20873449 ns/op\t19499412 B/op\t   69891 allocs/op\nPASS\nok  \tgithub.com/pjbgf/bench/example\t3.893s\n```\n\nWith the generated charts:\n![allocations chart](example/screenshots/allocs_op.png \"Allocations per Operation\")\n![ns chart](example/screenshots/ns_op.png \"Nanoseconds per Operation\")\n\n## License\n\nThis project is licensed under the Apache 2 License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjbgf%2Fbenchr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpjbgf%2Fbenchr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjbgf%2Fbenchr/lists"}