Giter Club home page Giter Club logo

ptg's Introduction

ptg

Performance testing tool (Go), It is also a GUI gRPC client.

Test the gRPC service like postman.

More screenshot

Features

  • CLI performance test support.
  • GUI support.
  • Metadata support.
  • Data persistence.
  • Search history.
  • Stream call.
  • Benchmark GUI.

Install

CLI app

go get github.com/crossoverJie/ptg
wget https://github.com/crossoverJie/ptg/releases/download/${version}/ptg-${os}-${version}.tar.gz

GUI app

To download the installer, go to the Releases Page.

Build from source

git clone [email protected]:crossoverJie/ptg.git
cd ptg
make release
make pkg-win
make pkg-macos

Usage

NAME:
   ptg - Performance testing tool (Go)

USAGE:
   ptg [global options] command [command options] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --thread value, -t value              -t 10 (default: 1 thread)
   --Request value, --proto value        -proto http/grpc (default: http)
   --protocol value, --pf value          -pf /file/order.proto
   --fully-qualified value, --fqn value  -fqn package.Service.Method
   --duration value, -d value            -d 10s (default: Duration of test in seconds, Default 10s)
   --request value, -c value             -c 100 (default: 100)
   --HTTP value, -M value                -m GET (default: GET)
   --bodyPath value, --body value        -body bodyPath.json
   --header value, -H value              HTTP header to add to request, e.g. "-H Content-Type: application/json"
   --target value, --tg value            http://gobyexample.com/grpc:127.0.0.1:5000
   --help, -h                            show help (default: false)

http

ptg -t 20 -d 10 -proto http -tg "http://gobyexample.com"

Benchmark test for 10 seconds, using 20 goroutines.

output:

Requesting: http://gobyexample.com  <---------------> 1 p/s 100.00%

43 requests in 10 seconds, 13.88MB read.
Avg Req Time:           358.512071ms
Fastest Request:        93.518704ms
Slowest Request:        840.680771ms
Number of Errors:       0

POST example

ptg -t 2 -proto http -c 2 -M POST -H "Content-Type: application/json"  -body test.json -tg "http://xx/create"

gRPC(unary call)

ptg -t 10 -c 100 -proto grpc  -pf /xx/xx.proto -fqn hello.Hi.Say -body test.json  -tg "127.0.0.1:5000"

output:

thread: 10, duration: 0, count 100
Requesting: 127.0.0.1:5000  <---------------> 102 p/s 100.00%
100 requests in 11 seconds, 230.6kB read, and cost 1 second.
Avg Req Time:           116.602652ms
Fastest Request:        111.563179ms
Slowest Request:        128.587886ms
Number of Errors:       0

Acknowledgements

ptg's People

Contributors

crossoverjie 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.