💥Performance testing tool (Go)

ptg

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

Test the gRPC service like postman.

Features

  • Cli performance test support.
  • GUI support.
  • Metadata support.
  • Data persistence.
  • 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

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
Owner
crossoverJie
You never know what you can do til you try.
crossoverJie
Similar Resources

Record and replay a go net.Conn, mosting for testing.

fakeconn Record and replay a go net.Conn, mostly for testing and debugging. This package isn't finished, so you probably shouldn't use it. Recording f

Dec 5, 2021

gRPC dummy service for testing purpose.

gRPC example Pre-requisite Protocol buffer installation $: brew install protobuf $: protoc --version # Ensure compiler version is 3+ Server go Gener

Mar 3, 2022

Echo-server - An HTTP echo server designed for testing applications and proxies

echo-server An HTTP echo server designed for testing applications and proxies. R

Dec 20, 2022

testing invoke self-define go module in another project

modulized go help mod go help mod init package main import ( "fmt" "github.com/leson/go_poc/greetings" ) func main() { fmt.Println("invoke self

Jan 9, 2022

Go-http-sleep: Delayed response http server, useful for testing various timeout issue for application running behind proxy

delayed response http server, useful for testing various timeout issue for application running behind proxy

Jan 22, 2022

Dummy - HTTP server for testing cluster deployments

dummy HTTP server for testing cluster deployments. Very small container image fo

Feb 17, 2022

Use qs-forward with QuickSocket to enable easy local development and testing!

Use qs-forward with QuickSocket to enable easy local development and testing!

qs-forward Use qs-forward with QuickSocket to enable easy local development and testing! Getting Started Want to jump in quick? Head over to the relea

Jul 3, 2022

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

fasthttp Fast HTTP implementation for Go. Currently fasthttp is successfully used by VertaMedia in a production serving up to 200K rps from more than

Jan 5, 2023

High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング

High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング

gaio Introduction 中文介绍 For a typical golang network program, you would first conn := lis.Accept() to get a connection and go func(net.Conn) to start a

Dec 29, 2022
Comments
  • Feature: Server reflection

    Feature: Server reflection

    Hello, this projects looks like a fantastic idea for a grpc gui client.

    I was wondering if you have thought about supporting the grpc server reflection feature?

  • LRU 模块Put 方法有 bug

    LRU 模块Put 方法有 bug

    func (l *LruCache) Put(k, v interface{}) {
    	l.lock.Lock()
    	defer l.lock.Unlock()
    	if l.values.Len() == l.size {
    		back := l.values.Back()
    		l.values.Remove(back)
    		delete(l.cacheMap, back)  // 这里试图删除 back 这个元素。但是通常来说,back 元素本身不会是 map 的 key
    	}
    
    	front := l.values.PushFront(v)
    	l.cacheMap[k] = front
    }
    
Fake server, Consumer Driven Contracts and help with testing performance from one configuration file with zero system dependencies and no coding whatsoever
Fake server, Consumer Driven Contracts and help with testing performance from one configuration file with zero system dependencies and no coding whatsoever

mockingjay server Mockingjay lets you define the contract between a consumer and producer and with just a configuration file you get: A fast to launch

Jan 6, 2023
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.
Subfinder is a subdomain discovery tool that discovers valid subdomains for websites. Designed as a passive framework to be useful for bug bounties and safe for penetration testing.

Fast passive subdomain enumeration tool. Features • Install • Usage • API Setup • License • Join Discord Subfinder is a subdomain discovery tool that

Jan 4, 2023
WebRTC media servers stress testing tool (currently only Janus)
 WebRTC media servers stress testing tool (currently only Janus)

GHODRAT WebRTC media servers stress testing tool (currently only Janus) Architecture Janus media-server under load Deployment ghodrat # update or crea

Nov 9, 2022
TCPProbe is a modern TCP tool and service for network performance observability.
TCPProbe is a modern TCP tool and service for network performance observability.

TCPProbe is a modern TCP tool and service for network performance observability. It exposes information about socket’s underlying TCP session, TLS and HTTP (more than 60 metrics). you can run it through command line or as a service. the request is highly customizable and you can integrate it with your application through gRPC. it runs in a Kubernetes cluster as cloud native application and by adding annotations on pods allow a fine control of the probing process.

Dec 15, 2022
:alarm_clock: :fire: A TCP proxy to simulate network and system conditions for chaos and resiliency testing
:alarm_clock: :fire: A TCP proxy to simulate network and system conditions for chaos and resiliency testing

Toxiproxy Toxiproxy is a framework for simulating network conditions. It's made specifically to work in testing, CI and development environments, supp

Jan 7, 2023
A function for chaos testing with OpenFaaS

chaos-fn A function for chaos testing with OpenFaaS Use-cases Test retries on certain HTTP codes Test timeouts Test certain lengths of HTTP request bo

May 26, 2022
Fixtures for testing standard IPLD codecs

IPLD Codec Fixtures This repository contains fixtures for standard IPLD codecs. It is used to verify the correctness, compatibility and limitations of

Nov 2, 2022
Toxiproxy - A TCP proxy to simulate network and system conditions for chaos and resiliency testing
Toxiproxy - A TCP proxy to simulate network and system conditions for chaos and resiliency testing

Toxiproxy is a framework for simulating network conditions. It's made specifically to work in testing, CI and development environments, supp

Nov 3, 2021
HTTP API traffic recording and replay middleware based on GoReplay, can be used for migration and refactoring testing

gorc HTTP API traffic recording and replay middleware based on GoReplay, can be used for migration and refactoring testing. English | 中文 Requirements

Feb 13, 2022
Simple script fro DNS upload testing. Written in Go.

BENCH DNS Simple script fro DNS upload testing. Written in Go. Features Using local domain list file with -file argument Download from URL and then us

Dec 6, 2021