loadtest

command
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 27 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command loadtest drives a bubbles server with many realtime clients and reports send-to-receive latency, message loss and server memory.

go run ./tools/loadtest --clients 200 --senders 20 --rate 5 --duration 60s \
    --assert-p95 150ms --assert-rss 300MB

Without --url it builds ./cmd/bubbles into a temporary directory, starts it with a throwaway data directory on random loopback ports and tears it down afterwards. Every message carries its send timestamp in the body; receivers compute the latency from that timestamp (Unix nanoseconds, read from the same host clock). Latency is therefore only meaningful when the generator and the server run on one host; do not compare numbers taken across hosts. Loss is decided by comparing message-ID sets: every ID posted to a channel must appear in each subscribed client's set.

Seq gaps are not counted as loss. The seq is global and the server filters each replay and live event by visibility, so a client sees gaps by design. Only a seq that does not increase (a regression) is reported.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL