MCPcopy Create free account
hub / github.com/cortexproject/cortex / createPrometheusRemoteWriteV2Protobuf

Function createPrometheusRemoteWriteV2Protobuf

pkg/util/push/push_test.go:1196–1213  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1194}
1195
1196func createPrometheusRemoteWriteV2Protobuf(t *testing.T) []byte {
1197 t.Helper()
1198 input := writev2.Request{
1199 Symbols: []string{"", "__name__", "foo"},
1200 Timeseries: []writev2.TimeSeries{
1201 {
1202 LabelsRefs: []uint32{1, 2},
1203 Samples: []writev2.Sample{
1204 {Value: 1, Timestamp: time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC).UnixNano()},
1205 },
1206 },
1207 },
1208 }
1209
1210 inoutBytes, err := input.Marshal()
1211 require.NoError(t, err)
1212 return inoutBytes
1213}
1214
1215func createPrometheusRemoteWriteProtobuf(t *testing.T) []byte {
1216 t.Helper()

Callers 2

TestHandler_remoteWriteFunction · 0.85

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected