MCPcopy Index your code
hub / github.com/prometheus/prometheus / TotalSamplesPerStepMap

Method TotalSamplesPerStepMap

util/stats/query_stats.go:170–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168}
169
170func (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.

Callers 1

TestQueryStatisticsFunction · 0.80

Calls 1

Tested by 1

TestQueryStatisticsFunction · 0.64