tsenart/trunks is a open-source project on GitHub, written primarily in Rust. It has 30 stars. Vegeta's almighty scion in the making, Trunks brings a decade of load testing power to an entirely new tool written in Rust 🦀. It's over 90,000!
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Trunks is a versatile HTTP load testing tool written in Rust. It's the son of
Vegeta, rewritten from scratch in Rust for
maximum performance. It's over 90,000!
Features
Usable as both a command line tool and a Rust library
CLI designed with UNIX composability in mind — pipe attack results into reports, plots, and transcoders
Avoids Coordinated Omission — pacing is clock-based, not response-driven
Extensive reporting: text, JSON, histogram, HDR
HTML latency plots with LTTB downsampling
Dynamic worker scaling — automatically spawns workers when the attack falls behind
Custom DNS resolution with configurable caching TTL
HTTP/HTTPS proxy support with CONNECT tunneling
Prometheus metrics exporter
Multiple pacer types: constant, linear, sine
Graceful two-phase shutdown (Ctrl+C drains in-flight, second Ctrl+C force exits)
Three output encodings: JSON, CSV, MessagePack
Redirect following with cross-origin credential stripping
Install
Pre-compiled binaries
Download pre-compiled binaries from the
GitHub Releases page.
Homebrew (macOS)
brew install tsenart/tap/trunks
Cargo
cargo install trunks-cli
Source
git clone https://github.com/tsenart/trunks.git
cd trunks
cargo build --release
# Binary at ./target/release/trunks
Usage
Usage: trunks <COMMAND>
Commands:
attack Execute an HTTP load test
report Generate reports from attack results
plot Generate HTML plot from attack results
encode Transcode attack results between encodings
trunks attack
Execute an HTTP load test against one or more targets.
trunks attack [OPTIONS] --name <NAME>
Targeting
Flag
Default
Description
--name
required
Attack name — used in reports and the x-trunks-attack request header
--targets
stdin
Targets file path. Use stdin to read from a pipe
--format
http
Target format: http or json
--lazy
false
Read targets lazily instead of pre-loading into memory
--body
Request body file path (used as default body for all targets)
Pacing
Flag
Default
Description
--duration
0s
Duration of the test. 0 = run forever (until Ctrl+C)
--rate
0/1s
Request rate as freq[/duration]. 0 or infinity = max rate. Examples: 50/1s, 100, 10/500ms
--pace
constant
Pacer type: constant, linear, sine
--slope
0.0
Linear pacer slope in hits/s² increase per second
--sine-period
Sine pacer period (e.g. 10s, 1m). Required for sine pacer
--sine-amp
Sine pacer amplitude as rate (e.g. 50/1s). Required for sine pacer
--sine-offset
mean-up
Sine pacer starting offset: mean-up, peak, mean-down, trough
Workers
Flag
Default
Description
--workers
num_cpus
Initial number of workers
--max-workers
0
Maximum number of workers. 0 = no dynamic scaling. When set, workers are spawned automatically when the attack falls behind
The report and plot commands merge results from multiple files or concatenated
streams — use the same --name across machines for unified series in plots.
Vegeta compatibility
Trunks' JSON output format is compatible with vegeta's JSON encoding, making migration
straightforward. The http target format is also compatible. If you're already using
vegeta, you can switch to trunks and continue using your existing target files and
reporting pipelines.
Prometheus support
When --prometheus-addr is specified, trunks starts an HTTP server exposing metrics
at /metrics in Prometheus exposition format.
use futures::StreamExt;
use std::sync::Arc;
use std::time::Duration;
use tokio::sync::Mutex;
use tokio_util::sync::CancellationToken;
use trunks::{Attack, ConstantPacer, Target, Targets};
#[tokio::main]
async fn main() -> eyre::Result<()> {
let target = Arc::new(Target {
method: "GET".parse()?,
url: "http://localhost:8080/".parse()?,
..Default::default()
});
let targets: Targets = vec![target].into();
let stop = CancellationToken::new();
let client = hyper::Client::new();
let pacer = Arc::new(ConstantPacer {
freq: 50,
per: Duration::from_secs(1),
});
let atk = Attack::builder("example", client, pacer, Arc::new(Mutex::new(targets)))
.duration(Duration::from_secs(5))
.workers(4)
.max_workers(16)
.stop(stop)
.build();
let mut hits = atk.run();
while let Some(result) = hits.next().await {
match result {
Ok(hit) => println!("{}: {} {}",
hit.seq, hit.code, hit.latency.as_millis()),
Err(e) => eprintln!("error: {}", e),
}
}
Ok(())
}
Limitations
System resource limits
On many systems, the default number of open file descriptors is too low for high-rate
load testing. Each connection requires a file descriptor, so you may need to increase
the limit:
ulimit -n 65535
On macOS:
sudo launchctl limit maxfiles 65535 200000
Timing precision
On Unix systems, trunks uses a minimum sleep threshold of 1ms before switching to
a spin loop for sub-millisecond pacing. On Windows, this threshold is 16ms due to
the platform's timer resolution.
License
Copyright 2023 Tomás Senart.
Licensed under the Apache License, Version 2.0.
See LICENSE file for details.
No homepage URL was recorded for tsenart/trunks in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Does tsenart/trunks have any tags?
TopGit's last sync did not record any GitHub topics for tsenart/trunks. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on tsenart/trunks?
The most recent commit recorded on tsenart/trunks was 8 months ago, based on the GitHub push timestamp. The repository has 3 forks — one of the better signals of community interest.
Is tsenart/trunks open source?
Yes — tsenart/trunks ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/tsenart/trunks.
What license does tsenart/trunks use?
tsenart/trunks is released under the Apache-2.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about tsenart/trunks?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/tsenart/trunks is the definitive source.
Read full README in the tab above.
Still deciding about trunks?
One click hands the question to an AI along with this page — see what it says about trunks.