Code Monkey home page Code Monkey logo

pea's Introduction

Gatling Pea

Build Status GitHub release Maven Central


关于 Gatling

Gatling 是基于 NettyAkka 技术实现的高性能压测工具.

关于 Pea

由于单独一台机器硬件资源和网络协议的限制存在, 在高负载测试中需要多台机器共同提供负载. Pea 是在以 Galting 为引擎, 在多节点场景下的压测工具. 包含以下特性:

  • 管理和监控多个工作节点. 依赖 Zookeeper
  • 运行过程中可以实时查看每个节点的具体执行状态
  • 多个节点执行完后会自动收集日志, 生成统一的报告
  • 支持原生的 Gatling 脚本, 原生的 HTTP 协议
  • 扩展支持了 DubboGrpc 协议
  • 以 Git 仓库管理脚本和资源文件
  • 内置了 Scala 增量编译器, 脚本可在线快速编译
  • 不同于其他实现, 所有这些功能都在同一进程内实现. 感谢 Gatling 作者高质量的代码
  • 可以在实体机, 虚拟机, Docker 容器中运行

脚本示例

import io.gatling.core.Predef._
import pea.dubbo.Predef._
import pea.dubbo.api.GreetingService
import pea.gatling.PeaSimulation

class DubboGreetingSimulation extends PeaSimulation {
  override val description: String =
    """
      |Dubbo simulation example
      |""".stripMargin
  val dubboProtocol = dubbo
    .application("gatling-pea")
    .endpoint("127.0.0.1", 20880)
    .threads(10)
  val scn = scenario("dubbo")
    .exec(
      invoke(classOf[GreetingService]) { (service, _) =>
        service.sayHello("pea")
      }.check(simple { response =>
        response.value == "hi, pea"
      }).check(
        jsonPath("$").is("hi, pea")
      )
    )
  setUp(
    scn.inject(atOnceUsers(10000))
  ).protocols(dubboProtocol)
}

版本

pea gatling dubbo grpc
0.6.0~ 3.3.1 2.7.4.1 1.22.2

视频演示

https://www.bilibili.com/video/av73339161/

截图示例

创建任务

任务执行中的节点状态

整体报告

单个请求细节报告

pea's People

Contributors

xcorpio avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.