pea


License

License

MIT
Categories

Categories

Akka Container Microservices Reactive libraries
GroupId

GroupId

cc.akkaha
ArtifactId

ArtifactId

pea_2.12
Last Version

Last Version

0.7.0
Release Date

Release Date

Type

Type

jar
Description

Description

pea
pea
Project URL

Project URL

https://github.com/asura-pro/pea
Project Organization

Project Organization

cc.akkaha
Source Code Management

Source Code Management

https://github.com/asura-pro/pea

Download pea_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/cc.akkaha/pea_2.12/ -->
<dependency>
    <groupId>cc.akkaha</groupId>
    <artifactId>pea_2.12</artifactId>
    <version>0.7.0</version>
</dependency>
// https://jarcasting.com/artifacts/cc.akkaha/pea_2.12/
implementation 'cc.akkaha:pea_2.12:0.7.0'
// https://jarcasting.com/artifacts/cc.akkaha/pea_2.12/
implementation ("cc.akkaha:pea_2.12:0.7.0")
'cc.akkaha:pea_2.12:jar:0.7.0'
<dependency org="cc.akkaha" name="pea_2.12" rev="0.7.0">
  <artifact name="pea_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='cc.akkaha', module='pea_2.12', version='0.7.0')
)
libraryDependencies += "cc.akkaha" % "pea_2.12" % "0.7.0"
[cc.akkaha/pea_2.12 "0.7.0"]

Dependencies

compile (23)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.8
cc.akkaha : pea-common_2.12 jar 0.7.0
cc.akkaha : pea-dubbo_2.12 jar 0.7.0
cc.akkaha : pea-grpc_2.12 jar 0.7.0
com.typesafe.play : twirl-api_2.12 jar 1.4.2
com.trueaccord.scalapb : scalapb-runtime_2.12 jar 0.6.7
com.typesafe.play : play-server_2.12 jar 2.7.4
com.typesafe.play : play-logback_2.12 jar 2.7.4
com.typesafe.play : play-akka-http-server_2.12 jar 2.7.4
com.typesafe.play : filters-helpers_2.12 jar 2.7.4
com.typesafe.akka : akka-stream_2.12 jar 2.5.26
io.gatling.highcharts : gatling-charts-highcharts jar 3.3.1
io.gatling : gatling-compiler jar 3.3.1
org.apache.curator : curator-recipes jar 2.12.0
com.github.oshi : oshi-core jar 4.0.0
org.pac4j : play-pac4j_2.12 jar 8.0.0
org.pac4j : pac4j-http jar 3.7.0
org.pac4j : pac4j-ldap jar 3.7.0
org.pac4j : pac4j-jwt jar 3.7.0
com.typesafe.play : play-json_2.12 jar 2.7.4
com.typesafe.play : play-guice_2.12 jar 2.7.4
com.typesafe.play : play-ehcache_2.12 jar 2.7.4
com.typesafe.play : play-ahc-ws_2.12 jar 2.7.4

test (2)

Group / Artifact Type Version
com.typesafe.play : play-test_2.12 jar 2.7.4
org.scalatestplus.play : scalatestplus-play_2.12 jar 4.0.3

Project Modules

There are no modules declared in this project.

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/

截图示例

创建任务

任务执行中的节点状态

整体报告

单个请求细节报告

cc.akkaha

Versions

Version
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.5
0.1.0