{"id":15651238,"url":"https://github.com/ayrat555/hornet","last_synced_at":"2025-06-18T14:32:49.973Z","repository":{"id":40557248,"uuid":"300638004","full_name":"ayrat555/hornet","owner":"ayrat555","description":"Hornet is a simple library for stress testing","archived":false,"fork":false,"pushed_at":"2023-04-10T20:59:37.000Z","size":57,"stargazers_count":33,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-03T20:39:08.228Z","etag":null,"topics":["elixir","performance-testing","stress","stress-testing","testing"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/ayrat555.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-10-02T14:19:42.000Z","updated_at":"2023-01-05T06:42:56.000Z","dependencies_parsed_at":"2024-10-03T12:38:36.036Z","dependency_job_id":"d6c4a826-775c-476b-8a97-0541ae76966c","html_url":"https://github.com/ayrat555/hornet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ayrat555/hornet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayrat555%2Fhornet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayrat555%2Fhornet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayrat555%2Fhornet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayrat555%2Fhornet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayrat555","download_url":"https://codeload.github.com/ayrat555/hornet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayrat555%2Fhornet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260570096,"owners_count":23029623,"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":["elixir","performance-testing","stress","stress-testing","testing"],"created_at":"2024-10-03T12:37:34.278Z","updated_at":"2025-06-18T14:32:44.953Z","avatar_url":"https://github.com/ayrat555.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hornet\n\nHornet is a simple library for stress testing.\n\nIt executes the given function with the given rate (calls per second), dynamically changing the number of processes to maintain the rate.\n\n## Installation\n\nThe easiest way to add Hornet to your project is by [using Mix](http://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html).\n\nAdd `:hornet` as a dependency to your project's `mix.exs`:\n\n```elixir\ndefp deps do\n  [\n    {:hornet, \"~\u003e 0.1.2\"}\n  ]\nend\n```\n\n## Usage\n\nTo start Hornet use `Hornet.start/1`:\n\n```elixir\nparams = [rate: 100, func: fn -\u003e 1 + 1 end, id: :add]\n\nHornet.start(params)\n```\n\nIt accepts a keyword list.\n\nRequired parameters:\n\n- `rate` - the required rate in operations per seconds. For example, 100 (ops/second)\n- `func` - the anonymous function that has to be executed. For example, `fn -\u003e 1 + 1 end`\n- `id` - atom that will be used for Hornet's process names.\n\nOptional parameters:\n\n- `start_period` - every process executes the given function periodically. This is a starting value for this period. The default value is 100 ms.\n- `adjust_step` - if the given rate can no be maintained (for example, if the function is executed too long), Hornet will start increasing the number of processes and the execution period for each process. The period will start increasing by `adjust_step`. The default value is 50ms.\n- `adjust_period` - the number of processes is adjusted periodically by `adjust_period` value. The default value is 5_000 ms.\n- `error_rate` - allowed rate for difference between the expected rate and the actual rate: `|current_rate - expected_rate| \u003c error_rate * expected_rate`. The default value is 0.1.\n- `process_number_limit` - if the given function's execution time is too long and the required rate is high, Hornet will be spawning processes indefinitely. This value will limit the number of processes. The default value is nil.\n- `rate_period` - the period of measuring the current rate. The default value is 1_000 ms.\n- `log_period` - the interval for the log messages. Disabled by default.\n\nTo stop Hornet use `Hornet.stop/1`:\n\n```elixir\n:ok = Hornet.stop(:hello)\n```\n\nIt accepts the pid returned by `Hornet.start/1` or the provided id.\n\n## Contributing\n\n1. [Fork it!](http://github.com/ayrat555/hornet/fork)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## Author\n\nAyrat Badykov (@ayrat555)\n\n## License\n\nHornet is released under the MIT License. See the LICENSE file for further\ndetails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayrat555%2Fhornet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayrat555%2Fhornet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayrat555%2Fhornet/lists"}