MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / Dec

Method Dec

cmd/http-stats.go:218–227  ·  view source on GitHub ↗

Dec increments the api stats counter.

(api string)

Source from the content-addressed store, hash-verified

216
217// Dec increments the api stats counter.
218func (stats *HTTPAPIStats) Dec(api string) {
219 if stats == nil {
220 return
221 }
222 stats.Lock()
223 defer stats.Unlock()
224 if val, ok := stats.apiStats[api]; ok && val > 0 {
225 stats.apiStats[api]--
226 }
227}
228
229// Load returns the recorded stats.
230func (stats *HTTPAPIStats) Load() map[string]int {

Callers 1

collectAPIStatsFunction · 0.80

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected