MCPcopy
hub / github.com/cortexlabs/cortex / GetAllAndDelete

Method GetAllAndDelete

pkg/proxy/request_stats.go:41–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41func (s *RequestStats) GetAllAndDelete() []int64 {
42 var output []int64
43 s.Lock()
44 defer s.Unlock()
45 output = s.counts
46 s.counts = []int64{}
47 return output
48}
49
50func (s *RequestStats) Report() RequestStatsReport {
51 requestCounts := s.GetAllAndDelete()

Callers 1

ReportMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected