Skip to content

Commit

Permalink
temporary: use more labels in remote read and remote write tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mircodz committed Feb 14, 2024
1 parent 6c12f09 commit 7080c6a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 3 additions & 3 deletions storage/remote/read_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ func TestSampledReadEndpoint(t *testing.T) {
func BenchmarkStreamReadEndpoint(b *testing.B) {
store := promql.LoadedStorage(b, `
load 1m
test_metric1{foo="bar1",baz="qux"} 0+100x119
test_metric1{foo="bar2",baz="qux"} 0+100x120
test_metric1{foo="bar3",baz="qux"} 0+100x240
test_metric1{foo0="bar1",baz0="qux",foo1="bar1",baz2="qux",foo2="bar1",baz3="qux",foo4="bar1",baz4="qux",foo5="bar1",baz5="qux"} 0+100x119
test_metric1{foo0="bar2",baz0="qux",foo1="bar2",baz2="qux",foo2="bar2",baz3="qux",foo4="bar2",baz4="qux",foo5="bar2",baz5="qux"} 0+100x120
test_metric1{foo0="bar3",baz0="qux",foo1="bar3",baz2="qux",foo2="bar3",baz3="qux",foo4="bar3",baz4="qux",foo5="bar3",baz5="qux"} 0+100x240
`)

b.Cleanup(func() { store.Close() })
Expand Down
11 changes: 10 additions & 1 deletion storage/remote/write_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,16 @@ func BenchmarkRemoteWritehandler(b *testing.B) {
buf, _, _, err := buildWriteRequest(nil, []*prompb.TimeSeries{{
Labels: []*prompb.Label{
{Name: "__name__", Value: "test_metric"},
{Name: "test_label_name_" + num, Value: labelValue + num},
{Name: "test_label_name0_" + num, Value: labelValue + num},
{Name: "test_label_name1_" + num, Value: labelValue + num},
{Name: "test_label_name2_" + num, Value: labelValue + num},
{Name: "test_label_name3_" + num, Value: labelValue + num},
{Name: "test_label_name4_" + num, Value: labelValue + num},
{Name: "test_label_name5_" + num, Value: labelValue + num},
{Name: "test_label_name6_" + num, Value: labelValue + num},
{Name: "test_label_name7_" + num, Value: labelValue + num},
{Name: "test_label_name8_" + num, Value: labelValue + num},
{Name: "test_label_name9_" + num, Value: labelValue + num},
},
Histograms: []*prompb.Histogram{HistogramToHistogramProto(0, &testHistogram)},
}}, nil, nil, nil, nil)
Expand Down

0 comments on commit 7080c6a

Please sign in to comment.