benchmark

package
v0.0.0-...-18e1ab8 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSyncPeriod = 4*time.Minute + 30*time.Second
	LimitBytes        = 200 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchmark

type Benchmark struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *Config) (*Benchmark, error)

New creates a new Benchmark based on the provided Config. If the Config contains invalid values, then an error is returned.

func (*Benchmark) Reconfigure

func (b *Benchmark) Reconfigure(cfg *Config) error

Reconfigure reconfigures an existing Benchmark instnace.

func (*Benchmark) Run

func (b *Benchmark) Run()

Run starts a Benchmark instance.

func (*Benchmark) Stop

func (b *Benchmark) Stop()

Stop will pause a Benchmark instance.

type Config

type Config struct {
	ToAuthorize *url.URL
	ToUpload    *url.URL
	ToCAFile    string
	ToToken     string
	ToTokenFile string
	Interval    time.Duration
	MetricsFile string
	Workers     int
	Logger      log.Logger
}

Config defines the parameters that can be used to configure a worker. The only required field is `From`.

Jump to

Keyboard shortcuts

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