(nSeries int)
| 958 | } |
| 959 | |
| 960 | func benchmarkData(nSeries int) (allLabels []labels.Labels, allSamples []cortexpb.Sample) { |
| 961 | for j := range nSeries { |
| 962 | lbls := chunk.BenchmarkLabels.Copy() |
| 963 | |
| 964 | builder := labels.NewBuilder(labels.EmptyLabels()) |
| 965 | lbls.Range(func(l labels.Label) { |
| 966 | val := l.Value |
| 967 | if l.Name == "cpu" { |
| 968 | val = fmt.Sprintf("cpu%02d", j) |
| 969 | } |
| 970 | |
| 971 | builder.Set(l.Name, val) |
| 972 | }) |
| 973 | |
| 974 | allLabels = append(allLabels, builder.Labels()) |
| 975 | allSamples = append(allSamples, cortexpb.Sample{TimestampMs: 0, Value: float64(j)}) |
| 976 | } |
| 977 | return |
| 978 | } |
| 979 | |
| 980 | func TestIngesterMetricLimitExceeded(t *testing.T) { |
| 981 | limits := defaultLimitsTestConfig() |
no test coverage detected