()
| 168 | } |
| 169 | |
| 170 | func (qs *QuerySamples) TotalSamplesPerStepMap() *TotalSamplesPerStep { |
| 171 | if !qs.EnablePerStepStats { |
| 172 | return nil |
| 173 | } |
| 174 | |
| 175 | ts := TotalSamplesPerStep{} |
| 176 | for _, s := range qs.totalSamplesPerStepPoints() { |
| 177 | ts[s.T] = int(s.V) |
| 178 | } |
| 179 | return &ts |
| 180 | } |
| 181 | |
| 182 | // SamplesReadPerStepMap returns the per-step samples read as a map |
| 183 | // (timestamp -> count), or nil if per-step stats are disabled. |