Documentation
¶
Overview ¶
Package stats contains calculation utils for benchmarks Based on https://github.com/anycable/websocket-bench/blob/master/benchmark/stat.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ResAggregate ¶
type ResAggregate struct {
// contains filtered or unexported fields
}
ResAggregate contains duration samples
func (*ResAggregate) Add ¶
func (agg *ResAggregate) Add(rtt time.Duration)
Add adds a new sample to the aggregate
func (*ResAggregate) Count ¶
func (agg *ResAggregate) Count() int
Count returns the number of samples
func (*ResAggregate) Percentile ¶
func (agg *ResAggregate) Percentile(p int) time.Duration
Percentile returns the p-th percentile
Click to show internal directories.
Click to hide internal directories.