chaos-php/chaos-monkey 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chaos-php/chaos-monkey

最新稳定版本:1.1.1

Composer 安装命令:

composer require chaos-php/chaos-monkey

包简介

Chaos Monkey is a resiliency tool that helps PHP applications tolerate random failures

README 文档

README

Minimum PHP Version build Latest Stable Version GitHub

Chaos Monkey for PHP applications. Try to attack your running PHP App.

Assaults

  • Latency Assault - adds a delay randomly from the range (min and max)
  • Exception Assault - throws given exception class
  • Memory Assault - fill memory until target fraction (95% for example)
  • Kill Assault - no mercy, plain exit()

How to use

The best experience you can get is using ready-made integrations:

If your framework is missing, open an issue or use this package manually:

  1. Install with composer:
    composer require chaos-php/chaos-monkey
  2. Create ChaosMonkey object
    $settings = new Settings();
    $chaosMonkey = new ChaosMonkey([
       new LatencyAssault($settings),
       new MemoryAssault($settings),
       new ExceptionAssault($settings),
       new KillAppAssault($settings)
    ], $settings);
  3. Configure settings and trigger chaos monkey in the working place of the application:
    $settings->setExceptionActive(true);
    $settings->setExceptionClass(\RuntimeException::class);
    $settings->setProbability(100);
    $settings->setEnabled(true);
    
    
    $chaosMonkey->call();
  4. Watch your app plunge into chaos 🙈🙊🙉 😈

License

ChaosMonkey is released under the MIT Licence. See the bundled LICENSE file for details.

Author

Arkadiusz Kondas

统计信息

  • 总下载量: 3.24k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 28
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 28
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-28