Skip to content

Commit

Permalink
add drive cache stats
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Oct 19, 2024
1 parent 8f9ae3b commit 711c352
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions info-commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand All @@ -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"`
Expand Down

0 comments on commit 711c352

Please sign in to comment.