(t *testing.T, storage *teststorage.TestStorage, n int)
| 464 | } |
| 465 | |
| 466 | func addNativeHistogramsToTestSuite(t *testing.T, storage *teststorage.TestStorage, n int) { |
| 467 | lbls := labels.FromStrings("__name__", "test_histogram_metric1", "baz", "qux") |
| 468 | |
| 469 | app := storage.Appender(t.Context()) |
| 470 | for i, fh := range tsdbutil.GenerateTestFloatHistograms(n) { |
| 471 | _, err := app.AppendHistogram(0, lbls, int64(i)*int64(60*time.Second/time.Millisecond), nil, fh) |
| 472 | require.NoError(t, err) |
| 473 | } |
| 474 | |
| 475 | lbls = labels.FromStrings("__name__", "test_nhcb_metric1", "baz", "qux") |
| 476 | for i, fh := range tsdbutil.GenerateTestCustomBucketsFloatHistograms(n) { |
| 477 | _, err := app.AppendHistogram(0, lbls, int64(i)*int64(60*time.Second/time.Millisecond), nil, fh) |
| 478 | require.NoError(t, err) |
| 479 | } |
| 480 | |
| 481 | require.NoError(t, app.Commit()) |
| 482 | } |
no test coverage detected
searching dependent graphs…