diff --git a/pkg/madmin/info-commands.go b/pkg/madmin/info-commands.go index f6f93265e..db9ffe5d0 100644 --- a/pkg/madmin/info-commands.go +++ b/pkg/madmin/info-commands.go @@ -74,11 +74,34 @@ type ServerConnStats struct { TotalOutputBytes uint64 `json:"received"` } +// ServerHTTPMethodStats holds total number of HTTP operations from/to the server, +// including the average duration the call was spent. +type ServerHTTPMethodStats struct { + Count uint64 `json:"count"` + AvgDuration string `json:"avgDuration"` +} + +// ServerHTTPStats holds all type of http operations performed to/from the server +// including their average execution time. +type ServerHTTPStats struct { + TotalHEADStats ServerHTTPMethodStats `json:"totalHEADs"` + SuccessHEADStats ServerHTTPMethodStats `json:"successHEADs"` + TotalGETStats ServerHTTPMethodStats `json:"totalGETs"` + SuccessGETStats ServerHTTPMethodStats `json:"successGETs"` + TotalPUTStats ServerHTTPMethodStats `json:"totalPUTs"` + SuccessPUTStats ServerHTTPMethodStats `json:"successPUTs"` + TotalPOSTStats ServerHTTPMethodStats `json:"totalPOSTs"` + SuccessPOSTStats ServerHTTPMethodStats `json:"successPOSTs"` + TotalDELETEStats ServerHTTPMethodStats `json:"totalDELETEs"` + SuccessDELETEStats ServerHTTPMethodStats `json:"successDELETEs"` +} + // ServerInfoData holds storage, connections and other // information of a given server type ServerInfoData struct { StorageInfo StorageInfo `json:"storage"` ConnStats ServerConnStats `json:"network"` + HTTPStats ServerHTTPStats `json:"http"` Properties ServerProperties `json:"server"` }