loadtest

command
v0.0.0-...-9ea3341 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 27 Imported by: 0 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 measures how a gundb relay copes with many connected users. It starts the relay in a child process, so its CPU and memory are measured apart from the load generator. It then connects N simulated users and runs these phases:

idle    N users connected and doing nothing: memory and goroutines per user
write   every user puts to its own node and waits for the ack, in a loop
read    every user gets a random existing node, in a loop
fanout  every user subscribes to one node; one writer updates it at -rate/s

Users are lightweight WebSocket clients that speak GUN's wire protocol, the way a browser does, so the numbers describe the relay, not N client DBs.

go run ./loadtest -users 100,1000,10000
go run ./loadtest -users 1000 -store pebble -duration 20s

Jump to

Keyboard shortcuts

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