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

Function collectAPIStats

cmd/handler-utils.go:353–364  ·  view source on GitHub ↗
(api string, f http.HandlerFunc)

Source from the content-addressed store, hash-verified

351}
352
353func collectAPIStats(api string, f http.HandlerFunc) http.HandlerFunc {
354 return func(w http.ResponseWriter, r *http.Request) {
355 globalHTTPStats.currentS3Requests.Inc(api)
356 defer globalHTTPStats.currentS3Requests.Dec(api)
357
358 statsWriter := xhttp.NewResponseRecorder(w)
359
360 f.ServeHTTP(statsWriter, r)
361
362 globalHTTPStats.updateStats(api, r, statsWriter)
363 }
364}
365
366// Returns "/bucketName/objectName" for path-style or virtual-host-style requests.
367func getResource(path string, host string, domains []string) (string, error) {

Callers 1

registerAPIRouterFunction · 0.85

Calls 4

IncMethod · 0.80
DecMethod · 0.80
ServeHTTPMethod · 0.80
updateStatsMethod · 0.80

Tested by

no test coverage detected