From 711c35292afba87768521e6d1b972eefe07f69d4 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 19 Oct 2024 03:47:57 -0700 Subject: [PATCH] add drive cache stats --- info-commands.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/info-commands.go b/info-commands.go index 0eb8774..df858a6 100644 --- a/info-commands.go +++ b/info-commands.go @@ -448,6 +448,15 @@ type DiskMetrics struct { APILatencies map[string]interface{} `json:"apiLatencies,omitempty"` } +// CacheStats drive cache stats +type CacheStats struct { + Hits int64 `json:"hits"` + Misses int64 `json:"misses"` + DelHits int64 `json:"delHits"` + DelMisses int64 `json:"delMisses"` + Collisions int64 `json:"collisions"` +} + // Disk holds Disk information type Disk struct { Endpoint string `json:"endpoint,omitempty"` @@ -473,6 +482,7 @@ type Disk struct { UsedInodes uint64 `json:"used_inodes"` FreeInodes uint64 `json:"free_inodes,omitempty"` Local bool `json:"local,omitempty"` + Cache *CacheStats `json:"cacheStats,omitempty"` // Indexes, will be -1 until assigned a set. PoolIndex int `json:"pool_index"`