# 使用 Homebrew, MacPorts, Nix, scoop 安装 ghz

查看 ghz 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:ghz
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ghz
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ghz
```

  证据: MacPorts ports tree: net/ghz/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#ghz
```

  证据: nixpkgs package indexes: pkgs/by-name/gh/ghz/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install main/ghz
```

  证据: Scoop official bucket manifest trees: bucket/ghz.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:ghz
- **软件包管理器:** Homebrew
- **版本:** 0.121.0
- **来源摘要:** Simple gRPC benchmarking and load testing tool
- **主页:** <https://ghz.sh>
- **仓库:** <https://github.com/bojand/ghz>
- **最后更新:** 2026-07-29T16:05:00+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ghz (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.121.0
## 项目历史与用法

ghz is a Go-based command-line utility and library for benchmarking and load testing gRPC services. Its niche is the gap between generic HTTP load generators and the protocol-specific needs of gRPC users, including proto files, reflection, metadata, streaming calls, and structured reports.

### 项目历史

The public GitHub repository was created in March 2018 by Bojan D., with the project described from the start as a simple gRPC benchmarking and load testing tool. The documentation presents ghz as both a CLI and a Go package, so the project evolved around two usage surfaces: a terminal tool for direct test runs and library APIs for embedding performance tests in Go programs.

The release stream moved through many 0.x versions, with tagged releases reaching the 0.100 series by the early 2020s. That long pre-1.0 series fits the tool's role in a fast-moving gRPC ecosystem, where users needed practical support for proto/protoset inputs, reflection, TLS options, load schedules, output formats, and CI-friendly regression testing.

### 采用历史

ghz gained adoption among teams that operate gRPC services and need a protocol-aware load generator rather than adapting HTTP-centric tools. Its availability through Homebrew, MacPorts, Nix, Scoop, Docker, GitHub releases, and `go install` made it easy to put into developer laptops, CI jobs, and ephemeral benchmark environments.

The repository's public footprint, package-manager coverage, and dedicated documentation site indicate a tool used beyond a single internal project. Its significance is strongest in Go and gRPC communities, where generated protobuf types and service method names are already part of the normal development workflow.

### 使用方式

Practitioners use ghz to run local checks against a gRPC endpoint, tune request rate and worker concurrency, exercise unary or streaming methods, and emit summary, JSON, CSV, HTML, or Influx-compatible output. The documented Go package lets teams build custom performance tests around the same runner and printer machinery.

A common workflow is to provide a `.proto` file or protoset, name a fully qualified service method, pass JSON call data and metadata, then vary request counts, duration, rate limits, concurrency schedules, and TLS settings while watching latency and error distributions.

### 为什么软件包爱好者会关心

For package maintainers, ghz is a compact example of a Go CLI that ships well across ecosystems: single binaries, Homebrew formula, Scoop manifest, Nix package, Docker build, and direct `go install`. For users, it is the installable gRPC benchmarker that avoids building a one-off harness for every service.

### 时间线

- 2018: Public GitHub repository created.
- 2023: The project had tagged releases in the 0.113 to 0.117 range.
- 2024: Releases continued through the 0.120 series.
- 2025: The 0.121.0 release was published.

### Related projects

- ghz is related to gRPC, Protocol Buffers, Go benchmark tooling, and general load-testing tools such as wrk, vegeta, and k6, but it specializes in gRPC request construction and reporting.

### 来源

- <https://api.github.com/repos/bojand/ghz>
- <https://ghz.sh/docs/intro.html>
- <https://github.com/bojand/ghz>
- <https://github.com/bojand/ghz/releases>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - ghz: normalized package name match | nixpkgs package indexes: pkgs/by-name/gh/ghz/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - ghz: normalized package name match | MacPorts ports tree: net/ghz/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/ghz: normalized package name match | Scoop official bucket manifest trees: bucket/ghz.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/ghz.yml](https://github.com/mxcl/pkgdb/blob/main/combined/ghz.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
