[#725] writecache: Fix metric values
All checks were successful
DCO action / DCO (pull_request) Successful in 1m33s
Build / Build Components (1.21) (pull_request) Successful in 3m11s
Build / Build Components (1.20) (pull_request) Successful in 3m22s
Vulncheck / Vulncheck (pull_request) Successful in 3m34s
Tests and linters / Tests (1.20) (pull_request) Successful in 6m0s
Tests and linters / Tests (1.21) (pull_request) Successful in 6m1s
Tests and linters / Staticcheck (pull_request) Successful in 6m4s
Tests and linters / Tests with -race (pull_request) Successful in 3m58s
Tests and linters / Lint (pull_request) Successful in 11m43s
All checks were successful
DCO action / DCO (pull_request) Successful in 1m33s
Build / Build Components (1.21) (pull_request) Successful in 3m11s
Build / Build Components (1.20) (pull_request) Successful in 3m22s
Vulncheck / Vulncheck (pull_request) Successful in 3m34s
Tests and linters / Tests (1.20) (pull_request) Successful in 6m0s
Tests and linters / Tests (1.21) (pull_request) Successful in 6m1s
Tests and linters / Staticcheck (pull_request) Successful in 6m4s
Tests and linters / Tests with -race (pull_request) Successful in 3m58s
Tests and linters / Lint (pull_request) Successful in 11m43s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
121f5c4dd8
commit
d4b6ebe7e7
11 changed files with 19 additions and 31 deletions
|
@ -68,16 +68,10 @@ func (m *writeCacheMetrics) Get(d time.Duration, success bool, st writecache.Sto
|
|||
|
||||
func (m *writeCacheMetrics) Delete(d time.Duration, success bool, st writecache.StorageType) {
|
||||
m.metrics.AddMethodDuration(m.shardID, "Delete", success, d, st.String())
|
||||
if success {
|
||||
m.metrics.DecActualCount(m.shardID, st.String())
|
||||
}
|
||||
}
|
||||
|
||||
func (m *writeCacheMetrics) Put(d time.Duration, success bool, st writecache.StorageType) {
|
||||
m.metrics.AddMethodDuration(m.shardID, "Put", success, d, st.String())
|
||||
if success {
|
||||
m.metrics.IncActualCount(m.shardID, st.String())
|
||||
}
|
||||
}
|
||||
|
||||
func (m *writeCacheMetrics) SetEstimateSize(db, fstree uint64) {
|
||||
|
@ -99,7 +93,6 @@ func (m *writeCacheMetrics) Flush(success bool, st writecache.StorageType) {
|
|||
}
|
||||
|
||||
func (m *writeCacheMetrics) Evict(st writecache.StorageType) {
|
||||
m.metrics.DecActualCount(m.shardID, st.String())
|
||||
m.metrics.IncOperationCounter(m.shardID, "Evict", metrics.NullBool{}, st.String())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue