(labels []cortexpb.LabelAdapter, ts, value int64, histogram bool)
| 3490 | } |
| 3491 | |
| 3492 | func makeWriteRequestTimeseries(labels []cortexpb.LabelAdapter, ts, value int64, histogram bool) cortexpb.PreallocTimeseries { |
| 3493 | t := cortexpb.PreallocTimeseries{ |
| 3494 | TimeSeries: &cortexpb.TimeSeries{ |
| 3495 | Labels: labels, |
| 3496 | }, |
| 3497 | } |
| 3498 | if histogram { |
| 3499 | t.Histograms = append(t.Histograms, cortexpb.WrapHistogram(cortexpb.HistogramToHistogramProto(ts, tsdbutil.GenerateTestHistogram(value)))) |
| 3500 | } else { |
| 3501 | t.Samples = append(t.Samples, cortexpb.Sample{ |
| 3502 | TimestampMs: ts, |
| 3503 | Value: float64(value), |
| 3504 | }) |
| 3505 | } |
| 3506 | return t |
| 3507 | } |
| 3508 | |
| 3509 | func makeWriteRequestTimeseriesNHCB(labels []cortexpb.LabelAdapter, ts, value int64) cortexpb.PreallocTimeseries { |
| 3510 | return cortexpb.PreallocTimeseries{ |
no test coverage detected