runner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Histogram

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

func NewHistogram

func NewHistogram(size int, rangeMin, rangeMax float64) *Histogram

func (*Histogram) Add

func (h *Histogram) Add(value float64)

func (*Histogram) GetPercentileAndReset

func (h *Histogram) GetPercentileAndReset(p int) float64

atomic function to get percentile and clear values

func (*Histogram) Percentile

func (h *Histogram) Percentile(p int) float64

func (*Histogram) Print

func (h *Histogram) Print()

type Runner

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

func NewRunner

func NewRunner(option *RunnerOpts) *Runner

func (*Runner) Prepare

func (r *Runner) Prepare(bench benchmark.Benchmark) error

func (*Runner) Run

func (r *Runner) Run(bench benchmark.Benchmark) error

type RunnerOpts

type RunnerOpts struct {
	Threads        int    `long:"threads" description:"number of threads to use" default:"1"`
	Events         uint64 `long:"events" description:"limit for total number of events" default:"0"`
	Time           int    `long:"time" description:"limit for total execution time in seconds" default:"10"`
	ReportInterval int    ``                                                                                                        /* 162-byte string literal not displayed */
	Histogram      string `long:"histogram" choice:"on" choice:"off" description:"print latency histogram in report" default:"off"` //nolint:staticcheck
	Percentile     int    `long:"percentile" description:"percentile to calculate in latency statistics (1-100)" default:"95"`
}

Jump to

Keyboard shortcuts

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