pea-common


License

License

MIT
Categories

Categories

Akka Container Microservices Reactive libraries
GroupId

GroupId

cc.akkaha
ArtifactId

ArtifactId

pea-common_2.12
Last Version

Last Version

0.7.0
Release Date

Release Date

Type

Type

jar
Description

Description

pea-common
pea-common
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-common_2.12

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.8
com.typesafe.akka : akka-actor_2.12 jar 2.5.26
com.fasterxml.jackson.module : jackson-module-scala_2.12 jar 2.10.1

Project Modules

There are no modules declared in this project.

Gatling Pea

Build Status GitHub release Maven Central


关于 Gatling

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

关于 Pea

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

  • 管理和监控多个工作节点. 依赖 Zookeeper
  • 运行过程中可以实时查看每个节点的具体执行状态
  • 多个节点执行完后会自动收集日志, 生成统一的报告
  • 支持原生的 Gatling 脚本, 原生的 HTTP 协议
  • 扩展支持了 Dubbo和 Grpc 协议
  • 以 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