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

Method Report

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

Source from the content-addressed store, hash-verified

48}
49
50func (s *RequestStats) Report() RequestStatsReport {
51 requestCounts := s.GetAllAndDelete()
52
53 total := 0.0
54 if len(requestCounts) > 0 {
55 for _, val := range requestCounts {
56 total += float64(val)
57 }
58
59 total /= float64(len(requestCounts))
60 }
61
62 return RequestStatsReport{AvgInFlight: total}
63}
64
65type RequestStatsReport struct {
66 AvgInFlight float64

Callers 1

mainFunction · 0.95

Calls 1

GetAllAndDeleteMethod · 0.95

Tested by

no test coverage detected