MCPcopy Index your code
hub / github.com/cortexproject/cortex / createRequest

Function createRequest

integration/grpc_server_test.go:262–283  ·  view source on GitHub ↗
(i int)

Source from the content-addressed store, hash-verified

260}
261
262func createRequest(i int) *cortexpb.WriteRequest {
263 labels := createLabels(i)
264 return &cortexpb.WriteRequest{
265 Timeseries: []cortexpb.PreallocTimeseries{
266 {
267 TimeSeries: &cortexpb.TimeSeries{
268 Labels: labels,
269 Samples: []cortexpb.Sample{
270 {TimestampMs: int64(i), Value: float64(i)},
271 },
272 Exemplars: []cortexpb.Exemplar{
273 {
274 Labels: labels,
275 Value: float64(i),
276 TimestampMs: int64(i),
277 },
278 },
279 },
280 },
281 },
282 }
283}
284
285func createLabels(i int) []cortexpb.LabelAdapter {
286 labels := make([]cortexpb.LabelAdapter, 0, 100)

Callers 2

PushMethod · 0.70
TestConcurrentGrpcCallsFunction · 0.70

Calls 1

createLabelsFunction · 0.85

Tested by

no test coverage detected