etcd: Index | Files

package report

import ""

Package report generates human-readable benchmark reports.


Package Files

doc.go report.go timeseries.go weighted.go

func Percentiles Uses

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

Percentiles returns percentile distribution of float64 slice.

type DataPoint Uses

type DataPoint struct {
    Timestamp  int64
    MinLatency time.Duration
    AvgLatency time.Duration
    MaxLatency time.Duration
    ThroughPut int64

type Report Uses

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 Uses

func NewReport(precision string) Report

func NewReportRate Uses

func NewReportRate(precision string) Report

func NewReportSample Uses

func NewReportSample(precision string) Report

func NewWeightedReport Uses

func NewWeightedReport(r Report, precision string) Report

NewWeightedReport returns a report that includes both weighted and unweighted statistics.

type Result Uses

type Result struct {
    Start  time.Time
    End    time.Time
    Err    error
    Weight float64

Result describes the timings for an operation.

func (*Result) Duration Uses

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

type Stats Uses

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 Uses

type TimeSeries []DataPoint

func (TimeSeries) Len Uses

func (t TimeSeries) Len() int

func (TimeSeries) Less Uses

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

func (TimeSeries) String Uses

func (t TimeSeries) String() string

func (TimeSeries) Swap Uses

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

Package report imports 9 packages (graph). Updated 2018-08-28. Refresh now. Tools for package owners.