ChunksSize returns the size of all chunks in the response.
()
| 24 | |
| 25 | // ChunksSize returns the size of all chunks in the response. |
| 26 | func (m *QueryStreamResponse) ChunksSize() int { |
| 27 | if len(m.Chunkseries) == 0 { |
| 28 | return 0 |
| 29 | } |
| 30 | |
| 31 | size := 0 |
| 32 | for _, entry := range m.Chunkseries { |
| 33 | for _, chunk := range entry.Chunks { |
| 34 | size += chunk.Size() |
| 35 | } |
| 36 | } |
| 37 | return size |
| 38 | } |
| 39 | |
| 40 | func (m *QueryStreamResponse) SamplesCount() (count int) { |
| 41 | for _, cs := range m.Chunkseries { |