Versions in this module Expand all Collapse all v0 v0.0.5 Oct 28, 2022 v0.0.4 Oct 28, 2022 v0.0.3 Oct 28, 2022 v0.0.2 Oct 28, 2022 v0.0.1 Oct 28, 2022 Changes in this version + const CACHE_EXT + var DefaultPrecisionBundle = PrecisionBundle + type Annotation string + type CachedExperimentHeader struct + Name string + Version int + type Experiment struct + Measurements Measurements + Name string + func NewExperiment(name string) *Experiment + func (e *Experiment) ColorableString() string + func (e *Experiment) Get(name string) Measurement + func (e *Experiment) GetStats(name string) Stats + func (e *Experiment) MeasureDuration(name string, callback func(), args ...interface{}) time.Duration + func (e *Experiment) MeasureValue(name string, callback func() float64, args ...interface{}) float64 + func (e *Experiment) NewStopwatch() *Stopwatch + func (e *Experiment) RecordDuration(name string, duration time.Duration, args ...interface{}) + func (e *Experiment) RecordNote(note string, args ...interface{}) + func (e *Experiment) RecordValue(name string, value float64, args ...interface{}) + func (e *Experiment) Sample(callback func(idx int), samplingConfig SamplingConfig) + func (e *Experiment) SampleAnnotatedDuration(name string, callback func(idx int) Annotation, samplingConfig SamplingConfig, ...) + func (e *Experiment) SampleAnnotatedValue(name string, callback func(idx int) (float64, Annotation), ...) + func (e *Experiment) SampleDuration(name string, callback func(idx int), samplingConfig SamplingConfig, ...) + func (e *Experiment) SampleValue(name string, callback func(idx int) float64, samplingConfig SamplingConfig, ...) + func (e *Experiment) String() string + type ExperimentCache struct + Path string + func NewExperimentCache(path string) (ExperimentCache, error) + func (cache ExperimentCache) Clear() error + func (cache ExperimentCache) Delete(name string) error + func (cache ExperimentCache) List() ([]CachedExperimentHeader, error) + func (cache ExperimentCache) Load(name string, version int) *Experiment + func (cache ExperimentCache) Save(name string, version int, experiment *Experiment) error + type Measurement struct + Annotations []string + Durations []time.Duration + ExperimentName string + Name string + Note string + PrecisionBundle PrecisionBundle + Style string + Type MeasurementType + Units string + Values []float64 + func (m Measurement) ColorableString() string + func (m Measurement) Stats() Stats + func (m Measurement) String() string + type MeasurementType uint + const MeasurementTypeDuration + const MeasurementTypeInvalid + const MeasurementTypeNote + const MeasurementTypeValue + func (s *MeasurementType) UnmarshalJSON(b []byte) error + func (s MeasurementType) MarshalJSON() ([]byte, error) + func (s MeasurementType) String() string + type Measurements []Measurement + func (m Measurements) IdxWithName(name string) int + type PrecisionBundle struct + Duration time.Duration + ValueFormat string + func Precision(p interface{}) PrecisionBundle + type Ranking struct + Criteria RankingCriteria + Stats []Stats + func RankStats(criteria RankingCriteria, stats ...Stats) Ranking + func (c Ranking) ColorableString() string + func (c Ranking) String() string + func (c Ranking) Winner() Stats + type RankingCriteria uint + const HigherMaxIsBetter + const HigherMeanIsBetter + const HigherMedianIsBetter + const HigherMinIsBetter + const LowerMaxIsBetter + const LowerMeanIsBetter + const LowerMedianIsBetter + const LowerMinIsBetter + func (s *RankingCriteria) UnmarshalJSON(b []byte) error + func (s RankingCriteria) MarshalJSON() ([]byte, error) + func (s RankingCriteria) String() string + type SamplingConfig struct + Duration time.Duration + MinSamplingInterval time.Duration + N int + NumParallel int + type Stat uint + const StatInvalid + const StatMax + const StatMean + const StatMedian + const StatMin + const StatStdDev + func (s *Stat) UnmarshalJSON(b []byte) error + func (s Stat) MarshalJSON() ([]byte, error) + func (s Stat) String() string + type Stats struct + AnnotationBundle map[Stat]string + DurationBundle map[Stat]time.Duration + ExperimentName string + MeasurementName string + N int + PrecisionBundle PrecisionBundle + Style string + Type StatsType + Units string + ValueBundle map[Stat]float64 + func (s Stats) DurationFor(stat Stat) time.Duration + func (s Stats) FloatFor(stat Stat) float64 + func (s Stats) String() string + func (s Stats) StringFor(stat Stat) string + func (s Stats) ValueFor(stat Stat) float64 + type StatsType uint + const StatsTypeDuration + const StatsTypeInvalid + const StatsTypeValue + func (s *StatsType) UnmarshalJSON(b []byte) error + func (s StatsType) MarshalJSON() ([]byte, error) + func (s StatsType) String() string + type Stopwatch struct + Experiment *Experiment + func (s *Stopwatch) NewStopwatch() *Stopwatch + func (s *Stopwatch) Pause() *Stopwatch + func (s *Stopwatch) Record(name string, args ...interface{}) *Stopwatch + func (s *Stopwatch) Reset() *Stopwatch + func (s *Stopwatch) Resume() *Stopwatch + type Style string + type Units string