Help us shape the future of Go! Take the 2026 Go Developer Survey

hammer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetLeavesName = MapEntrypointName("GetLeaves")
	SetLeavesName = MapEntrypointName("SetLeaves")
	GetSMRName    = MapEntrypointName("GetSMR")
	GetSMRRevName = MapEntrypointName("GetSMRRev")
)

Constants for entrypoint names, as exposed in statistics/logging.

Variables

This section is empty.

Functions

func HitMap

func HitMap(cfg MapConfig) error

HitMap performs load/stress operations according to given config.

Types

type MapBias

type MapBias struct {
	Bias map[MapEntrypointName]int

	// InvalidChance gives the odds of performing an invalid operation, as the N in 1-in-N.
	InvalidChance map[MapEntrypointName]int
	// contains filtered or unexported fields
}

MapBias indicates the bias for selecting different map operations.

func (*MapBias) Choose

func (hb *MapBias) Choose() MapEntrypointName

Choose randomly picks an operation to perform according to the biases.

func (*MapBias) Invalid

func (hb *MapBias) Invalid(ep MapEntrypointName) bool

Invalid randomly chooses whether an operation should be invalid.

type MapConfig

type MapConfig struct {
	MapID         int64
	MetricFactory monitoring.MetricFactory
	Client        trillian.TrillianMapClient
	EPBias        MapBias
	Operations    uint64
	EmitInterval  time.Duration
	IgnoreErrors  bool
}

MapConfig provides configuration for a stress/load test.

type MapEntrypointName

type MapEntrypointName string

MapEntrypointName identifies a Map RPC entrypoint

Directories

Path Synopsis
maphammer is a stress/load test for a Trillian Map.
maphammer is a stress/load test for a Trillian Map.

Jump to

Keyboard shortcuts

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