mirror of
https://github.com/prometheus/prometheus.git
synced 2026-04-18 20:21:05 +02:00
lint
Signed-off-by: Owen Williams <owen.williams@grafana.com>
This commit is contained in:
parent
2e82200362
commit
693761ba6e
@ -121,8 +121,8 @@ var (
|
||||
testrecord.WorstCase1000WithSTSamples,
|
||||
}
|
||||
versions = []struct {
|
||||
name string
|
||||
enableST bool
|
||||
name string
|
||||
enableST bool
|
||||
}{
|
||||
{"V1", false},
|
||||
{"V2", true},
|
||||
@ -134,7 +134,8 @@ var (
|
||||
-run '^$' -bench '^BenchmarkEncode_Samples' \
|
||||
-benchtime 5s -count 6 -cpu 2 -timeout 999m \
|
||||
| tee encode.txt
|
||||
benchstat -col /version encode.txt
|
||||
|
||||
benchstat -col /version encode.txt
|
||||
*/
|
||||
func BenchmarkEncode_Samples(b *testing.B) {
|
||||
for _, ver := range versions {
|
||||
@ -176,7 +177,8 @@ func BenchmarkEncode_Samples(b *testing.B) {
|
||||
-run '^$' -bench '^BenchmarkDecode_Samples' \
|
||||
-benchtime 5s -count 6 -cpu 2 -timeout 999m \
|
||||
| tee decode.txt
|
||||
benchstat -col /version decode.txt
|
||||
|
||||
benchstat -col /version decode.txt
|
||||
*/
|
||||
func BenchmarkDecode_Samples(b *testing.B) {
|
||||
for _, ver := range versions {
|
||||
@ -228,7 +230,8 @@ var (
|
||||
-run '^$' -bench '^BenchmarkEncode_Histograms' \
|
||||
-benchtime 5s -count 6 -cpu 2 -timeout 999m \
|
||||
| tee encode-hist.txt
|
||||
benchstat -col /version encode-hist.txt
|
||||
|
||||
benchstat -col /version encode-hist.txt
|
||||
*/
|
||||
func BenchmarkEncode_Histograms(b *testing.B) {
|
||||
for _, ver := range versions {
|
||||
@ -282,7 +285,8 @@ func BenchmarkEncode_Histograms(b *testing.B) {
|
||||
-run '^$' -bench '^BenchmarkDecode_Histograms' \
|
||||
-benchtime 5s -count 6 -cpu 2 -timeout 999m \
|
||||
| tee decode-hist.txt
|
||||
benchstat -col /version decode-hist.txt
|
||||
|
||||
benchstat -col /version decode-hist.txt
|
||||
*/
|
||||
func BenchmarkDecode_Histograms(b *testing.B) {
|
||||
for _, ver := range versions {
|
||||
@ -337,7 +341,8 @@ func BenchmarkDecode_Histograms(b *testing.B) {
|
||||
-run '^$' -bench '^BenchmarkEncode_FloatHistograms' \
|
||||
-benchtime 5s -count 6 -cpu 2 -timeout 999m \
|
||||
| tee encode-fhist.txt
|
||||
benchstat -col /version encode-fhist.txt
|
||||
|
||||
benchstat -col /version encode-fhist.txt
|
||||
*/
|
||||
func BenchmarkEncode_FloatHistograms(b *testing.B) {
|
||||
for _, ver := range versions {
|
||||
@ -391,7 +396,8 @@ func BenchmarkEncode_FloatHistograms(b *testing.B) {
|
||||
-run '^$' -bench '^BenchmarkDecode_FloatHistograms' \
|
||||
-benchtime 5s -count 6 -cpu 2 -timeout 999m \
|
||||
| tee decode-fhist.txt
|
||||
benchstat -col /version decode-fhist.txt
|
||||
|
||||
benchstat -col /version decode-fhist.txt
|
||||
*/
|
||||
func BenchmarkDecode_FloatHistograms(b *testing.B) {
|
||||
for _, ver := range versions {
|
||||
|
||||
@ -602,7 +602,7 @@ func (d *Decoder) histogramSamplesV2(dec *encoding.Decbuf, histograms []RefHisto
|
||||
if prev == nil || len(histograms) == 0 {
|
||||
prev = &RefHistogramSample{
|
||||
Ref: firstRef,
|
||||
ST: firstST,
|
||||
ST: firstST,
|
||||
}
|
||||
}
|
||||
|
||||
@ -781,7 +781,7 @@ func (d *Decoder) floatHistogramSamplesV2(dec *encoding.Decbuf, histograms []Ref
|
||||
if prev == nil || len(histograms) == 0 {
|
||||
prev = &RefFloatHistogramSample{
|
||||
Ref: firstRef,
|
||||
ST: firstST,
|
||||
ST: firstST,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -488,7 +488,6 @@ func TestRecord_MixedRegularAndCustomBucketHistogramPermutations(t *testing.T) {
|
||||
type tc struct {
|
||||
name string
|
||||
kinds []string
|
||||
stModes []stMode
|
||||
}
|
||||
|
||||
testCases := []tc{
|
||||
|
||||
@ -159,9 +159,9 @@ func GenCustomBucketHistograms(n int, stCase HistSTCase) []record.RefHistogramSa
|
||||
Ref: chunks.HeadSeriesRef(i),
|
||||
T: 1709000000 + int64(i)*15,
|
||||
H: &histogram.Histogram{
|
||||
Count: uint64(10 + i%100),
|
||||
Sum: float64(100+i) * 1.5,
|
||||
Schema: histogram.CustomBucketsSchema,
|
||||
Count: uint64(10 + i%100),
|
||||
Sum: float64(100+i) * 1.5,
|
||||
Schema: histogram.CustomBucketsSchema,
|
||||
PositiveSpans: []histogram.Span{
|
||||
{Offset: 0, Length: 8},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user