Documentation ¶
Index ¶
- Variables
- func UTest(a, b []float64) (float64, error)
- type BytesDistribution
- func (d *BytesDistribution) Append(v interface{})
- func (t *BytesDistribution) Diff(other Distribution) (DistributionDiff, error)
- func (d *BytesDistribution) Mean() float64
- func (d *BytesDistribution) Stddev() float64
- func (d *BytesDistribution) Summarize() string
- func (d *BytesDistribution) Type() string
- type Distribution
- type DistributionDiff
- type ErrorDistribution
- type ScriptExecData
- type TimeDistribution
- func (t *TimeDistribution) Append(v interface{})
- func (t *TimeDistribution) Diff(other Distribution) (DistributionDiff, error)
- func (t *TimeDistribution) Mean() time.Duration
- func (t *TimeDistribution) Stddev() time.Duration
- func (t *TimeDistribution) Summarize() string
- func (t *TimeDistribution) Type() string
Constants ¶
This section is empty.
Variables ¶
var BenchmarkCmd = &cobra.Command{ Use: "benchmark", Short: "Run exec time benchmarks", Run: func(cmd *cobra.Command, args []string) { benchmarkCmd(cmd) }, }
BenchmarkCmd executes the script execution benchmark.
var CompareCmd = &cobra.Command{ Use: "compare", Short: "Compare the results of two benchmark runs", Run: func(cmd *cobra.Command, args []string) { compareCmd(cmd) }, }
CompareCmd compares two benchmark results produced by the BenchmarkCmd.
var RootCmd = &cobra.Command{
Use: "exectime_benchmark",
Short: "Run and compare exectime benchmarks",
}
RootCmd executes the subcommands.
Functions ¶
Types ¶
type BytesDistribution ¶
type BytesDistribution struct {
Bytes []int
}
BytesDistribution contains Bytess and implements the Distribution interface.
func (*BytesDistribution) Append ¶
func (d *BytesDistribution) Append(v interface{})
Append a value to the bytes distribution.
func (*BytesDistribution) Diff ¶
func (t *BytesDistribution) Diff(other Distribution) (DistributionDiff, error)
Diff computes the difference between this distribution and another bytes distribution.
func (*BytesDistribution) Mean ¶
func (d *BytesDistribution) Mean() float64
Mean caluates the mean of the time distribution.
func (*BytesDistribution) Stddev ¶
func (d *BytesDistribution) Stddev() float64
Stddev calculates the stddev of the time distribution.
func (*BytesDistribution) Summarize ¶
func (d *BytesDistribution) Summarize() string
Summarize returns the Mean +/- stddev.
func (*BytesDistribution) Type ¶
func (d *BytesDistribution) Type() string
Type returns the type of distribution this is, for json marshalling purposes.
type Distribution ¶
type Distribution interface { Summarize() string Type() string Append(interface{}) Diff(Distribution) (DistributionDiff, error) }
Distribution is the interface used to make the stats.
type DistributionDiff ¶
type DistributionDiff interface {
Summarize() string
}
DistributionDiff represents the difference between two distributions.
type ErrorDistribution ¶
type ErrorDistribution struct {
Errors []error
}
ErrorDistribution contains Errors.
func (*ErrorDistribution) Append ¶
func (d *ErrorDistribution) Append(v interface{})
Append a value to the error distribution.
func (*ErrorDistribution) Diff ¶
func (t *ErrorDistribution) Diff(other Distribution) (DistributionDiff, error)
Diff computes the difference between this distribution and another error distribution.
func (*ErrorDistribution) Num ¶
func (d *ErrorDistribution) Num() int
Num counts the number of errors.
func (*ErrorDistribution) Summarize ¶
func (d *ErrorDistribution) Summarize() string
Summarize returns the number of errors.
func (*ErrorDistribution) Type ¶
func (d *ErrorDistribution) Type() string
Type returns the type of distribution this is, for json marshalling purposes.
type ScriptExecData ¶
type ScriptExecData struct { // The Name of the script we're running. Name string // The Distributions of Statistics to record. Distributions distributionMap }
ScriptExecData contains the data for a single executed script.
type TimeDistribution ¶
TimeDistribution contains Times and implements the Distribution interface.
func (*TimeDistribution) Append ¶
func (t *TimeDistribution) Append(v interface{})
Append a value to the time distribution.
func (*TimeDistribution) Diff ¶
func (t *TimeDistribution) Diff(other Distribution) (DistributionDiff, error)
Diff computes the difference between this distribution and another time distribution.
func (*TimeDistribution) Mean ¶
func (t *TimeDistribution) Mean() time.Duration
Mean caluates the mean of the time distribution.
func (*TimeDistribution) Stddev ¶
func (t *TimeDistribution) Stddev() time.Duration
Stddev calculates the stddev of the time distribution.
func (*TimeDistribution) Summarize ¶
func (t *TimeDistribution) Summarize() string
Summarize returns the Mean +/- stddev.
func (*TimeDistribution) Type ¶
func (t *TimeDistribution) Type() string
Type returns the type of distribution this is, for json marshalling purposes.