Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankhers/havoc
ChaosMonkey style testing for the BEAM
https://github.com/ankhers/havoc
beam chaos-monkey erlang testing
Last synced: 7 days ago
JSON representation
ChaosMonkey style testing for the BEAM
- Host: GitHub
- URL: https://github.com/ankhers/havoc
- Owner: ankhers
- License: apache-2.0
- Created: 2018-10-11T15:57:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T15:31:11.000Z (almost 2 years ago)
- Last Synced: 2024-10-19T16:48:43.883Z (19 days ago)
- Topics: beam, chaos-monkey, erlang, testing
- Language: Erlang
- Homepage:
- Size: 46.9 KB
- Stars: 54
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Havoc
======A ChaosMonkey style application that can randomly kill processes, as well as
TCP and UDP connections. Inspired by [dLuna/chaos_monkey](https://github.com/dLuna/chaos_monkey).Basic Usage
-----------
``` erlang
havoc:on().
```This will use the default options. The following is a list of currently
allowed options* `avg_wait` - The average amount of time you would like to wait between kills.
(default `5000`)
* `deviation` - The deviation of time allowed between kills. (default `0.3`)
* `supervisor` - Whether or not to kill supervisors. (default `false`)
* `process` - Whether or not to kill processes. (default `true`)
* `tcp` - Whether or not to kill TCP connections. (default `false`)
* `udp` - Whether or not to kill UDP connections. (default `false`)
* `nodes` - Either a list of atoms for node names, or any value that
`erlang:nodes/1` accepts. (default `this`)
* `applications` - A list of application names that you want to target.
(defaults to all applications except `kernel` and `havoc`)
* `otp_applications` - A list of OTP applications that you would like to target.
(default `[]`)
* `supervisors` - A list of supervisors that you want to target. Can be any
valid supervisor reference. (defaults to all supervisors)
* `killable_callback` - A `Fun` that gets called to decide if a `pid` or
`port` may be killed or not by returning `true` or `false`.
* `prekill_callback` - A `Fun` that gets called just before killing.You can specify options using `havoc:on/1`.
``` erlang
havoc:on([{avg_wait, 3000}, {deviation, 0.5}, process, tcp])
```It is also possible to check if havoc is currently active.
``` erlang
havoc:is_active()
```Build
-----$ rebar3 compile