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

Method SamplesCount

pkg/ingester/client/custom.go:40–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40func (m *QueryStreamResponse) SamplesCount() (count int) {
41 for _, cs := range m.Chunkseries {
42 for _, c := range cs.Chunks {
43 switch c.Encoding {
44 case int32(encoding.PrometheusXorChunk), int32(encoding.PrometheusHistogramChunk), int32(encoding.PrometheusFloatHistogramChunk):
45 count += int(binary.BigEndian.Uint16(c.Data))
46 }
47 }
48 }
49 return
50}
51
52func (m *LabelMatcher) MatcherType() (labels.MatchType, error) {
53 var t labels.MatchType

Callers 2

queryIngesterStreamMethod · 0.95
TestSamplesCountFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestSamplesCountFunction · 0.64