{"id":13582359,"url":"https://github.com/myzhan/boomer","last_synced_at":"2025-05-14T23:05:11.408Z","repository":{"id":38462004,"uuid":"52010217","full_name":"myzhan/boomer","owner":"myzhan","description":"A better load generator for locust, written in golang.","archived":false,"fork":false,"pushed_at":"2024-08-20T08:03:05.000Z","size":390,"stargazers_count":1204,"open_issues_count":11,"forks_count":243,"subscribers_count":50,"default_branch":"master","last_synced_at":"2025-05-13T11:53:58.398Z","etag":null,"topics":["benchmark","benchmark-framework","boomer","locust","performance","performance-testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myzhan.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":"2016-02-18T13:48:48.000Z","updated_at":"2025-04-15T08:52:10.000Z","dependencies_parsed_at":"2023-10-11T04:51:56.657Z","dependency_job_id":"4ce35648-36b1-4295-88d1-abfde352b377","html_url":"https://github.com/myzhan/boomer","commit_stats":{"total_commits":310,"total_committers":20,"mean_commits":15.5,"dds":"0.15161290322580645","last_synced_commit":"41a131e3afc499fe4112edb64334e98d9848eed0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myzhan%2Fboomer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myzhan%2Fboomer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myzhan%2Fboomer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myzhan%2Fboomer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myzhan","download_url":"https://codeload.github.com/myzhan/boomer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243358,"owners_count":22038046,"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","benchmark-framework","boomer","locust","performance","performance-testing"],"created_at":"2024-08-01T15:02:38.406Z","updated_at":"2025-05-14T23:05:06.298Z","avatar_url":"https://github.com/myzhan.png","language":"Go","funding_links":[],"categories":["Go","Tools \u0026 Integrations"],"sub_categories":["Workers"],"readme":"# boomer [![Build Status](https://github.com/myzhan/boomer/actions/workflows/unittest.yml/badge.svg)](https://github.com/myzhan/boomer/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/myzhan/boomer)](https://goreportcard.com/report/github.com/myzhan/boomer) [![Coverage Status](https://codecov.io/gh/myzhan/boomer/branch/master/graph/badge.svg)](https://codecov.io/gh/myzhan/boomer) [![Documentation Status](https://readthedocs.org/projects/boomer/badge/?version=latest)](https://boomer.readthedocs.io/en/latest/?badge=latest)\n\n## Links\n\n* Locust Website: \u003ca href=\"http://locust.io\"\u003elocust.io\u003c/a\u003e\n* Locust Documentation: \u003ca href=\"http://docs.locust.io\"\u003edocs.locust.io\u003c/a\u003e\n* Boomer Documentation: \u003ca href=\"https://boomer.readthedocs.io\"\u003eboomer.readthedocs.io\u003c/a\u003e\n\n## Description\n\nBoomer is a better load generator for locust, written in golang. It can spawn thousands of goroutines to run your code concurrently.\n\nIt will listen and report to the locust master automatically, your test results will be displayed on the master's web UI.\n\nUse it as a library, not a general-purpose benchmarking tool.\n\n## Versioning\n\nBoomer used to support all versions of locust, even if locust didn't keep backward compatibility.\n\nNow boomer follows locust's versioning, and the master branch works with locust's master branch.\n\nIf locust introduces breaking changes, boomer will have a tagged version that works previous version of locust.\n\n## Install\n\n```bash\n# Install the master branch\n$ go get github.com/myzhan/boomer@master\n# Install a tagged version that works with locust 1.6.0\n$ go get github.com/myzhan/boomer@v1.6.0\n```\n\n### Build\n\nBoomer use [gomq](https://github.com/myzhan/gomq) by default, which is a pure Go implementation of the ZeroMQ protocol.\n\nBecause of the instability of gomq, you can switch to [goczmq](https://github.com/zeromq/goczmq).\n\n```bash\n# use gomq\n$ go build -o a.out main.go\n# use goczmq\n$ go build -tags 'goczmq' -o a.out main.go\n```\n\nIf you fail to compile boomer with gomq, try to update gomq first.\n\n```bash\n$ go get -u github.com/myzhan/gomq\n```\n\n## Examples(main.go)\nThis is a example of boomer's API. You can find more in the \"examples\" directory.\n\n```go\npackage main\n\nimport \"time\"\nimport \"github.com/myzhan/boomer\"\n\nfunc foo(){\n    start := time.Now()\n    time.Sleep(100 * time.Millisecond)\n    elapsed := time.Since(start)\n\n    /*\n    Report your test result as a success, if you write it in locust, it will looks like this\n    events.request_success.fire(request_type=\"http\", name=\"foo\", response_time=100, response_length=10)\n    */\n    boomer.RecordSuccess(\"http\", \"foo\", elapsed.Nanoseconds()/int64(time.Millisecond), int64(10))\n}\n\nfunc bar(){\n    start := time.Now()\n    time.Sleep(100 * time.Millisecond)\n    elapsed := time.Since(start)\n\n    /*\n    Report your test result as a failure, if you write it in locust, it will looks like this\n    events.request_failure.fire(request_type=\"udp\", name=\"bar\", response_time=100, exception=Exception(\"udp error\"))\n    */\n    boomer.RecordFailure(\"udp\", \"bar\", elapsed.Nanoseconds()/int64(time.Millisecond), \"udp error\")\n}\n\nfunc main(){\n    task1 := \u0026boomer.Task{\n        Name: \"foo\",\n        // The weight is used to distribute goroutines over multiple tasks.\n        Weight: 10,\n        Fn: foo,\n    }\n\n    task2 := \u0026boomer.Task{\n        Name: \"bar\",\n        Weight: 20,\n        Fn: bar,\n    }\n\n    boomer.Run(task1, task2)\n}\n```\n\n## Run\n\nFor debug purpose, you can run tasks without connecting to the master.\n\n```bash\n$ go build -o a.out main.go\n./a.out --run-tasks foo,bar\n```\n\nOtherwise, start the master using the included `dummy.py`.\n\n```bash\n$ locust --master -f dummy.py\n```\n\n--max-rps means the max count that all the Task.Fn can be called in one second.\n\nThe result may be misleading if you call boomer.RecordSuccess() more than once in Task.Fn.\n\n```bash\n$ go build -o a.out main.go\n$ ./a.out --max-rps 10000\n```\n\nIf you want the RPS increase from zero to max-rps or infinity.\n\n```\n$ go build -o a.out main.go\n# The default interval is 1 second\n$ ./a.out --request-increase-rate 10\n# Change the interval to 1 minute\n# Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\"\n$ ./a.out --request-increase-rate 10/1m\n```\n\nSo far, dummy.py is necessary when starting a master, because locust needs such a file.\n\nDon't worry, dummy.py has nothing to do with your test.\n\n## Profiling\n\nYou may think there are bottlenecks in your load generator, don't hesitate to do profiling.\n\nBoth CPU and memory profiling are supported.\n\nIt's not suggested to run CPU profiling and memory profiling at the same time.\n\n### CPU Profiling\n\n```bash\n# 1. run locust master.\n# 2. run boomer with cpu profiling for 30 seconds.\n$ go run main.go -cpu-profile cpu.pprof -cpu-profile-duration 30s\n# 3. start test in the WebUI.\n# 4. run pprof.\n$ go tool pprof cpu.pprof\nType: cpu\nTime: Nov 14, 2018 at 8:04pm (CST)\nDuration: 30.17s, Total samples = 12.07s (40.01%)\nEntering interactive mode (type \"help\" for commands, \"o\" for options)\n(pprof) web\n```\n\n### Memory Profiling\n\n```bash\n# 1. run locust master.\n# 2. run boomer with memory profiling for 30 seconds.\n$ go run main.go -mem-profile mem.pprof -mem-profile-duration 30s\n# 3. start test in the WebUI.\n# 4. run pprof and try 'go tool pprof --help' to learn more.\n$ go tool pprof -alloc_space mem.pprof\nType: alloc_space\nTime: Nov 14, 2018 at 8:26pm (CST)\nEntering interactive mode (type \"help\" for commands, \"o\" for options)\n(pprof) top\n```\n\n## Exporter\nIf you are not satisfied with the build-in web monitor in Locust, you can run prometheus_exporter.py instead of dummy.py as your master.\n\nTry this\n\n```bash\n$ locust --master -f prometheus_exporter.py\n```\n\nThanks to Prometheus and Grafana, you will get an awesome dashboard: [Locust for Prometheus](https://grafana.com/grafana/dashboards/12081)\n\n## Contributing\n\nIf you are enjoying boomer and willing to add new features to it, you are welcome.\n\nAlso, good examples are welcome!!!\n\n## License\n\nOpen source licensed under the MIT license (see _LICENSE_ file for details).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyzhan%2Fboomer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyzhan%2Fboomer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyzhan%2Fboomer/lists"}