Documentation
¶
Index ¶
- Variables
- func GenCustomBucketHistograms(n int, stCase HistSTCase) []record.RefHistogramSample
- func GenExpHistograms(n int, stCase HistSTCase) []record.RefHistogramSample
- func GenFloatHistograms(src []record.RefHistogramSample) []record.RefFloatHistogramSample
- func GenTestRefSamplesCase(t testing.TB, c RefSamplesCase) []record.RefSample
- type HistDataCase
- type HistSTCase
- type RefSamplesCase
Constants ¶
This section is empty.
Variables ¶
var HistCounts = []int{10, 100, 1000}
HistCounts is the standard set of histogram counts for benchmarks.
var HistDataCases = []HistDataCase{ {"exp", GenExpHistograms}, {"nhcb", GenCustomBucketHistograms}, }
HistDataCases is the standard set of histogram data cases for benchmarks.
var HistSTCases = []HistSTCase{HistNoST, HistConstST, HistPrevTST, HistVariableST}
HistSTCases is the standard set of histogram ST cases for benchmarks.
Functions ¶
func GenCustomBucketHistograms ¶ added in v0.312.0
func GenCustomBucketHistograms(n int, stCase HistSTCase) []record.RefHistogramSample
GenCustomBucketHistograms generates n custom-bucket (NHCB) histograms (schema=-53) with incrementing refs. The stCase parameter controls how the ST field is populated.
func GenExpHistograms ¶ added in v0.312.0
func GenExpHistograms(n int, stCase HistSTCase) []record.RefHistogramSample
GenExpHistograms generates n standard exponential histograms (schema=1) with incrementing refs, same timestamp, and realistic bucket distributions. The stCase parameter controls how the ST field is populated.
func GenFloatHistograms ¶ added in v0.312.0
func GenFloatHistograms(src []record.RefHistogramSample) []record.RefFloatHistogramSample
GenFloatHistograms converts int histograms to float histograms, preserving ST.
func GenTestRefSamplesCase ¶
func GenTestRefSamplesCase(t testing.TB, c RefSamplesCase) []record.RefSample
Types ¶
type HistDataCase ¶ added in v0.312.0
type HistDataCase struct {
Name string
Gen func(n int, stCase HistSTCase) []record.RefHistogramSample
}
HistDataCase pairs a name with a histogram generator for benchmark tables.
type HistSTCase ¶ added in v0.312.0
type HistSTCase string
HistSTCase selects the start-time pattern for histogram test data generators.
const ( HistNoST HistSTCase = "no-st" HistConstST HistSTCase = "const-st" HistPrevTST HistSTCase = "prevt-st" HistVariableST HistSTCase = "var-st" )
type RefSamplesCase ¶
type RefSamplesCase string
const ( Realistic1000Samples RefSamplesCase = "real1000" Realistic1000WithVariableSTSamples RefSamplesCase = "real1000-vst" Realistic1000WithConstSTSamples RefSamplesCase = "real1000-cst" WorstCase1000 RefSamplesCase = "worst1000" WorstCase1000WithSTSamples RefSamplesCase = "worst1000-st" )