A cross-platform command-line HTTP(S) benchmarking and load-testing tool written in Go, built on fasthttp for high request throughput.
bojand/ghz
A command-line tool for benchmarking and load testing gRPC services, with configurable concurrency, rate limits and output formats.
- Stars
- 3,359
- Forks
- 284
- Open issues
- 101
- Last commit
- 6 days ago
What is it?
ghz is a command-line tool and Go package for measuring the performance of gRPC services. You point it at a host and a fully-qualified method, supply a .proto file or compiled protoset, and it sends requests while recording latency and throughput.
Load can be shaped in several ways: a constant request rate, a fixed number of concurrent workers, or step and line schedules that ramp RPS or concurrency over time. Tests can be bounded by request count or duration, and streaming calls are supported with options for message intervals and stream lifetimes. TLS, client certificates, metadata, and gzip compression are configurable.
Results can be printed as a summary, pretty text, JSON, CSV, HTML, or InfluxDB line formats. Test settings can also be stored in a JSON or TOML config file.
Key features
- 01Load schedules with constant rate, step, or line ramps for RPS and concurrency.
- 02Supports unary and streaming gRPC calls with proto files or protosets.
- 03TLS, client certificates, custom authority, and gzip compression options.
- 04Output in summary, pretty, JSON, CSV, HTML, or InfluxDB formats.
- 05Usable as a CLI or imported as a Go package.
Use cases
- Load testing a gRPC microservice before a release.
- Finding the request rate at which a service's latency starts to degrade.
- Comparing performance across service versions in a CI pipeline.
- Benchmarking gRPC endpoints under TLS or with compression enabled.
Quick start
- 1
Install with Homebrew
brew install ghz - 2
Or install with Go (1.23 or newer)
go install github.com/bojand/ghz/cmd/ghz@latest - 3
Run a load test against a gRPC server with a proto file and host
Things to know
- Documentation is hosted externally at ghz.sh rather than in the repository.
In collections
Topics
FAQ
- What is ghz?
- A command-line tool for benchmarking and load testing gRPC services, with configurable concurrency, rate limits and output formats. ghz is a command-line tool and Go package for measuring the performance of gRPC services. You point it at a host and a fully-qualified method, supply a .proto file or compiled protoset, and it sends requests while recording latency and throughput.
- Is ghz free to use? What license does it have?
- ghz is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is ghz still maintained?
- Actively maintained. The last commit to ghz was on Nov 1, 2026.
- What can I use ghz for?
- Load testing a gRPC microservice before a release. Finding the request rate at which a service's latency starts to degrade. Comparing performance across service versions in a CI pipeline. Benchmarking gRPC endpoints under TLS or with compression enabled.
- How do I install ghz?
- Install with Homebrew: brew install ghz Or install with Go (1.23 or newer): go install github.com/bojand/ghz/cmd/ghz@latest Run a load test against a gRPC server with a proto file and host
- Where can I get ghz?
- The source code and installation instructions are on GitHub: https://github.com/bojand/ghz
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source Java application for load testing and measuring the performance of web applications and other services.
Macrobenchmarking framework for Elasticsearch that sets up clusters, runs benchmark races, and compares results.
A command-line tool and Go library for HTTP load testing that sends requests at a constant rate and reports latency statistics.
A command-line tool for calling gRPC servers, like curl but using JSON input over gRPC, with schema discovery via server reflection or proto files.
Open-source load testing tool where performance tests are written as JavaScript and run from a Go binary.