# 使用 Homebrew, apt 安装 locust

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

## 安装

```sh
sudo av install brew:locust
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install locust
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install python3-locust
```

  证据: Debian stable package indexes: python3-locust from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## 软件包事实

- **软件包键:** brew:locust
- **软件包管理器:** Homebrew
- **版本:** 2.46.3
- **来源摘要:** Scalable user load testing tool written in Python
- **主页:** <https://locust.io/>
- **最后更新:** 2026-08-02T12:46:59Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- locust (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Locust is an open source load-testing framework that lets users write test scenarios in Python code and run them from a CLI and web UI. It became a major package in performance-testing workflows because it replaces click-built test plans with ordinary code and scalable distributed execution.

### 项目历史

Locust's official history page says it was created out of frustration with existing tools such as Apache JMeter and Tsung. The objection was both ergonomic and architectural: graphical point-and-click test design made complex scenarios hard to maintain, and thread-bound approaches limited concurrency.

The project was created in 2011 by Carl Bystrom and Jonatan Heyman while they were working on Battlelog, the companion app for Battlefield 3. That origin explains Locust's emphasis on simulating many concurrent users while keeping test behavior programmable.

The official repository describes Locust as an open source performance/load testing tool for HTTP and other protocols, with tests defined in regular Python code. Its docs grew to cover configuration files, distributed load generation, Docker, headless operation, web UI customization, and hosted load testing.

### 采用历史

Locust adoption spread among Python teams and service developers who wanted load tests in the same language and version-control workflow as application code. The official Locust Cloud retrospective describes the project as reaching thirteen years and tens of millions of downloads, indicating broad use beyond its original game-service context.

The 1.0 release was a significant API cleanup: the changelog documents renaming `Locust` and `HttpLocust` classes to `User` and `HttpUser`, changing client-count terminology to users, and enabling task declarations directly on User classes. Later 2.x releases continued that modernization while preserving the package's code-first model.

### 使用方式

A normal Locust project defines user behavior in a Python locustfile, then runs `locust` to open the web UI or uses headless command-line options in CI. The configuration docs list CLI flags, environment variables, and config-file keys for the same settings.

Locust looks for `~/.locust.conf`, `./locust.conf`, and `./pyproject.toml` by default, with `--config` available for an additional file. No official credentials file is documented for the open source CLI.

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

Locust is important to package nerds because it is a Python CLI that is also a test framework, a web application, and a distributed worker system. Packaging has to account for Python versions, transitive networking dependencies, and executable entry points.

It is also culturally important as a counterpoint to GUI-first load-testing tools: install a package, commit a locustfile, and scale from a local smoke test to distributed load generation.

### 时间线

- 2011: Locust was created by Carl Bystrom and Jonatan Heyman during Battlelog development.
- 2014: Locust 0.7-era changes updated major dependencies such as requests and gevent.
- 2020: Locust 1.0 introduced breaking API changes including `User` and `HttpUser` class names.
- 2021: Locust 2.0 refined distributed user control and other APIs.
- 2024: Locust maintainers described the project as thirteen years old with more than 60 million downloads.

### Related projects

- Apache JMeter and Tsung are explicitly named in Locust's official history as prior tools the authors had used.
- k6, Gatling, Artillery, wrk, Vegeta, and ApacheBench occupy adjacent load-testing niches with different languages and execution models.

### 来源

- <https://docs.locust.io/en/stable/changelog.html>
- <https://docs.locust.io/en/stable/configuration.html>
- <https://docs.locust.io/en/stable/history.html>
- <https://github.com/locustio/locust>
- <https://www.locust.cloud/blog/open-source-load-testing-with-locust/>


## 安全说明

没有找到 locust 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.locust.conf, ./locust.conf, ./pyproject.toml
## 其他软件包管理器记录

- Debian apt - python3-locust - 2.24.0-1: normalized package name match | Debian stable package indexes: python3-locust from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Developer friendly load testing framework | https://locust.io/
- Ubuntu apt - python3-locust - 2.24.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-locust from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Developer friendly load testing framework | https://locust.io/


## Combined YAML source

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


## 来源

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