Skip to content

Commit 19ee2e8

Browse files
sfc-gh-bxinmasih
authored andcommitted
Change a couple of cache hit rate to float type, to avoid unmarshal errors
Tested with: go test ./...
1 parent 3148740 commit 19ee2e8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

model.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ type Status struct {
177177
Name string `json:"name"`
178178
} `json:"messages"`
179179
PageCache struct {
180-
LogHitRate int `json:"log_hit_rate"`
181-
StorageHitRate int `json:"storage_hit_rate"`
180+
LogHitRate float64 `json:"log_hit_rate"`
181+
StorageHitRate float64 `json:"storage_hit_rate"`
182182
} `json:"page_cache"`
183183
Processes map[string]struct {
184184
Address string `json:"address"`

testdata/status2.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@
511511
}
512512
],
513513
"page_cache": {
514-
"log_hit_rate": 1,
515-
"storage_hit_rate": 1
514+
"log_hit_rate": 0.99832799999999999,
515+
"storage_hit_rate": 0.99840299999999993
516516
},
517517
"processes": {
518518
"05ab57c2b7cd6b51e62a1390da76217a": {

0 commit comments

Comments
 (0)