bench

package
v0.0.0-...-703b195 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bench

func Bench(config *Config) error

func HumanBytes

func HumanBytes(bytes float64, si bool) string

HumanBytes formats bytes as a human readable string

func MsgsPerClient

func MsgsPerClient(numMsgs, numClients int) []int

MsgsPerClient divides the number of messages by the number of clients and tries to distribute them as evenly as possible

Types

type Config

type Config struct {
	Messages    int    `long:"msgs" description:"Number of messages to publish" default:"1000000"`
	MessageSize int    `long:"msg-size" description:"Size of the test messages" default:"128"`
	Topic       string `long:"topic" description:"Topic name to use for benchmark (if empty generates random topic)" default:""`
	Publishers  int    `long:"pubs" description:"Number of concurrent publishers" default:"1"`
	Subscribers int    `long:"subs" description:"Number of concurrent subscribers" default:"1"`
	Resumers    int    `` /* 137-byte string literal not displayed */
	Runs        int    `long:"runs" description:"Number of times to run the benchmark" default:"1"`

	Addr string `long:"addr" description:"Address of the Figg server" default:"127.0.0.1:8119"`

	Verbose bool `short:"v" long:"verbose" description:"Add verbose logging to SDK clients"`
}

func ParseConfig

func ParseConfig() (*Config, error)

func (Config) String

func (c Config) String() string

Jump to

Keyboard shortcuts

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