Back to godoc.org
go.etcd.io/etcd / pkg / report

Package report

v3.1.10+incompatible
Latest Go to latest

The latest major version is .

Published: Jul 14, 2017 | License: Apache-2.0 | Module: go.etcd.io/etcd

Overview

Package report generates human-readable benchmark reports.

Index

func Percentiles

func Percentiles(nums []float64) (pcs []float64, data []float64)

Percentiles returns percentile distribution of float64 slice.

type DataPoint

type DataPoint struct {
	Timestamp  int64
	AvgLatency time.Duration
	ThroughPut int64
}

type Report

type Report interface {
	Results() chan<- Result

	// Run returns results in print-friendly format.
	Run() <-chan string

	// Stats returns results in raw data.
	Stats() <-chan Stats
}

Report processes a result stream until it is closed, then produces a string with information about the consumed result data.

func NewReport

func NewReport(precision string) Report

func NewReportRate

func NewReportRate(precision string) Report

func NewReportSample

func NewReportSample(precision string) Report

type Result

type Result struct {
	Start time.Time
	End   time.Time
	Err   error
}

Result describes the timings for an operation.

func (*Result) Duration

func (res *Result) Duration() time.Duration

type Stats

type Stats struct {
	AvgTotal   float64
	Fastest    float64
	Slowest    float64
	Average    float64
	Stddev     float64
	RPS        float64
	Total      time.Duration
	ErrorDist  map[string]int
	Lats       []float64
	TimeSeries TimeSeries
}

Stats exposes results raw data.

type TimeSeries

type TimeSeries []DataPoint

func (TimeSeries) Len

func (t TimeSeries) Len() int

func (TimeSeries) Less

func (t TimeSeries) Less(i, j int) bool

func (TimeSeries) String

func (ts TimeSeries) String() string

func (TimeSeries) Swap

func (t TimeSeries) Swap(i, j int)

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier