Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

NotificationsYou must be signed in to change notification settings

crossoverJie/ptg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Performance testing tool (Go), It is also aGUIgRPC client.

Test thegRPC service likepostman.

More screenshot

Features

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

Install

CLI app

gogetgithub.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 theReleases Page.

Build from source

git clone git@github.com:crossoverJie/ptg.gitcd ptgmake releasemake pkg-winmake 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 orhelpfor onecommandGLOBAL 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 oftestin 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                            showhelp (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 requestsin 10 seconds, 13.88MB read.Avg Req Time:           358.512071msFastest Request:        93.518704msSlowest Request:        840.680771msNumber 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 100Requesting: 127.0.0.1:5000<---------------> 102 p/s 100.00%100 requestsin 11 seconds, 230.6kB read, and cost 1 second.Avg Req Time:           116.602652msFastest Request:        111.563179msSlowest Request:        128.587886msNumber of Errors:       0

Acknowledgements

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp