spammer

package
Version: v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PLUGIN = node.NewPlugin("Spammer", node.Disabled, configure, run)

	// events of the spammer
	Events = &spammer.SpammerEvents{
		SpamPerformed:         events.NewEvent(spammer.SpamStatsCaller),
		AvgSpamMetricsUpdated: events.NewEvent(spammer.AvgSpamMetricsCaller),
	}

	// ErrSpammerDisabled is returned if the spammer plugin is disabled.
	ErrSpammerDisabled = errors.New("Spammer plugin disabled")
)
View Source
var (
	// ErrCPUPercentageUnknown is returned if the CPU usage couldn't be determined.
	ErrCPUPercentageUnknown = errors.New("CPU percentage unknown")
)

Functions

func Start

func Start(tpsRateLimit *float64, cpuMaxUsage *float64, bundleSize *int, valueSpam *bool) (float64, float64, int, bool, error)

Start starts the spammer to spam with the given settings, otherwise it uses the settings from the config.

func Stop

func Stop() error

Stop stops the spammer.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to