Documentation ¶
Overview ¶
Package teststat contains helper functions for statistical testing of metrics implementations.
Index ¶
- func AssertCirconusNormalHistogram(t *testing.T, mean, stdev, min, max int64, result []string)
- func AssertExpvarNormalHistogram(t *testing.T, metricName string, mean, stdev int64, quantiles []int)
- func AssertGraphiteNormalHistogram(t *testing.T, prefix, metricName string, mean, stdev int64, quantiles []int, ...)
- func AssertPrometheusBucketedHistogram(t *testing.T, metricName string, mean, stdev int64, buckets []float64)
- func AssertPrometheusNormalSummary(t *testing.T, metricName string, mean, stdev int64)
- func PopulateNormalHistogram(t *testing.T, h metrics.Histogram, seed int64, mean, stdev int64)
- func ScrapePrometheus(t *testing.T) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertCirconusNormalHistogram ¶
AssertCirconusNormalHistogram ensures the Circonus Histogram data captured in the result slice abides a normal distribution.
func AssertExpvarNormalHistogram ¶
func AssertExpvarNormalHistogram(t *testing.T, metricName string, mean, stdev int64, quantiles []int)
AssertExpvarNormalHistogram ensures the expvar Histogram referenced by metricName abides a normal distribution.
func AssertGraphiteNormalHistogram ¶
func AssertGraphiteNormalHistogram(t *testing.T, prefix, metricName string, mean, stdev int64, quantiles []int, gPayload string)
AssertGraphiteNormalHistogram ensures the expvar Histogram referenced by metricName abides a normal distribution.
func AssertPrometheusBucketedHistogram ¶
func AssertPrometheusBucketedHistogram(t *testing.T, metricName string, mean, stdev int64, buckets []float64)
AssertPrometheusBucketedHistogram ensures the Prometheus Histogram referenced by name has observations in the expected quantity and bucket.
func AssertPrometheusNormalSummary ¶
AssertPrometheusNormalSummary ensures the Prometheus Summary referenced by name abides a normal distribution.
func PopulateNormalHistogram ¶
PopulateNormalHistogram populates the Histogram with a normal distribution of observations.
func ScrapePrometheus ¶
ScrapePrometheus returns the text encoding of the current state of Prometheus.
Types ¶
This section is empty.