result

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

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

Result represents to records the results (number of successes or failures and latency) of the tests performed by Otchkiss. All implemented methods are thread safe without note.

func New

func New() (*Result, error)

New returns Result instance by default capacity (100M).

func WithCapacity

func WithCapacity(cap int) (*Result, error)

WithCapacity returns Result instance by given capacity. When case of capacity shortage performance may be affected due to automatic memory allocation. However too large value may cause OOM.

func (*Result) AppendFail

func (r *Result) AppendFail(t float64, err error)

func (*Result) AppendSuccess

func (r *Result) AppendSuccess(t float64)

func (*Result) Error

func (r *Result) Error() string

func (*Result) Errors

func (r *Result) Errors() []error

func (*Result) Failed

func (r *Result) Failed() int64

func (*Result) Latencies

func (r *Result) Latencies() []float64

func (*Result) PercentileLatency

func (r *Result) PercentileLatency(p int) (float64, error)

func (*Result) Succeeded

func (r *Result) Succeeded() int64

Jump to

Keyboard shortcuts

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