benchmarks

package
v0.0.0-...-57d2186 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMessage

func GenerateMessage(size int) []byte

Types

type Scenario

type Scenario struct {
	Name             string
	Duration         time.Duration
	NumPartitions    int // explicit partition count; 0 = use Producers
	Producers        int
	Consumers        int
	MsgSize          int           // bytes per message
	RatePerSec       int           // target messages/second per producer
	BurstEvery       time.Duration // inject burst at this interval (0 = no bursts)
	BurstFactor      int           // burst multiplier
	SkewRatio        float64       // fraction of messages using a fixed hot key (0 = uniform)
	Priorities       [10]float64   // probability distribution over priority levels
	Seed             int64         // RNG seed for deterministic replay; default 42
	BatchBytes       int           // target batch size in bytes (0 = default 16KB)
	LingerMs         int           // batch linger in ms for rate-limited producers (0 = default 1)
	ConsumerSkewRate float64       // heterogeneous consumer speed: slowest consumer relative speed [0,1]; 0 = uniform
}

func Bursty

func Bursty() Scenario

func GrowingLoad

func GrowingLoad() Scenario

func MixedPriority

func MixedPriority() Scenario

func Overload

func Overload() Scenario

func OverloadK16

func OverloadK16() Scenario

func OverloadK32

func OverloadK32() Scenario

func Skewed

func Skewed() Scenario

func Uniform

func Uniform() Scenario

func (*Scenario) SamplePriority

func (s *Scenario) SamplePriority() uint8

func (*Scenario) SamplePrioritySeeded

func (s *Scenario) SamplePrioritySeeded(rng *mrand.Rand) uint8

type Scenarios

type Scenarios []Scenario

func AllScenarios

func AllScenarios() Scenarios

func (Scenarios) FindByName

func (ss Scenarios) FindByName(name string) (bool, Scenario)

Jump to

Keyboard shortcuts

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