Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zalopay-oss/cannon
Cannon is a benchmark system. The aim is to build a multi-tenant system which provides intuitive UI/UX for users to submit tasks and perform benchmark.
https://github.com/zalopay-oss/cannon
benchmark golang grpc locust
Last synced: 2 months ago
JSON representation
Cannon is a benchmark system. The aim is to build a multi-tenant system which provides intuitive UI/UX for users to submit tasks and perform benchmark.
- Host: GitHub
- URL: https://github.com/zalopay-oss/cannon
- Owner: zalopay-oss
- Created: 2020-01-20T04:04:03.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-18T04:22:05.000Z (almost 5 years ago)
- Last Synced: 2024-11-18T23:04:29.418Z (2 months ago)
- Topics: benchmark, golang, grpc, locust
- Language: Go
- Size: 28 MB
- Stars: 11
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# ZaloPay Cannon
![version](https://img.shields.io/badge/version-0.1.0-red) [![issues](https://img.shields.io/badge/open%20issues-0-orange)]() [![contributors](https://img.shields.io/badge/contributors-3-blue)]()[![Build Status](https://travis-ci.org/zalopay-oss/cannon.svg?branch=master)](https://travis-ci.org/zalopay-oss/cannon)
## Introduction
ZaloPay Cannon is a benchmark system for ZaloPay's internal services. The aim is to build a multi-tenant system which provides intuitive UI/UX for users to submit tasks and perform benchmark.
## Architecture
![architecture](images/architecture.png)
## Features
- Benchmark gRPC service with given proto.
- Distributed testing: run tests on multiple slaves.
- Automatically generate input data.
- Visualize data: metrics data is stored and visualized using InfluxDB.
- Only support Unary RPCs.## Requirements
- Golang 1.13.1
- Locust
- Influxdb 2.0
- Python 3.7.3## Usage
- Make sure Locust, InfluxDB and gRPC server are running.
```bash
Usage:
cannon run [flags]Flags:
-c, --config string path of config file
-r, --hatchRate int config hatch rate (users spawned/second) (default 10)
-h, --help help for run
-H, --host string target gRPC host (default "localhost")
--locust-host string host of locust master (default "localhost")
--locust-port int port of locust master (default 5557)
--locust-web string locust web target (default "http://localhost:8089")
-m, --method string method name
-w, --no-workers int number of workers to simulate (default 10)
-P, --port int target gRPC port (default 8000)
-p, --proto string path of proto file```
- Cannon example config file
```yaml
# Locust Config
LocustWebPort: "http://0.0.0.0:7000/"
LocustHost: "127.0.0.1"
LocustPort: 5557
NoWorkers: 80 # Number of connections
HatchRate: 10 # Hatch rate# InfluxDB Config
IsPersistent: "true" # turn on if you want save metrics in influxDB
Bucket: "benchmark-results" # InfluxDB bucket's name
Origin: "zlp-osss"
DatabaseAddr: "http://0.0.0.0:9999"
Token: "egc6_K6V0pCmEwIahIzmnoneommTcsa7TS5XtmcSBnR9VeX31dMsRJ_STN-bUqOwWW77vPiU0aM9RGMQFwxT-A=="# gRPC benchmark target
GRPCHost: "localhost"
GRPCPort: 4770
Proto: "./proto-name.proto"
Method: "serviceName.methodName"
```- You can start `multiple instances of cannon` to benchmark in `distributed mode`.
- Monitor at dashboard locust## Example
Read the [example](example/README.md)
## Roadmap
Read the [roadmap](docs/ROADMAP.md)
## Acknowledgements
- Thanks to @anhld2, which served as an inspiration and guide in building this project.
- Special thanks to @thinhda, @tranndc and @quyenpt3 for their work on making component-based theming a reality.