@@ -85,11 +85,11 @@ type Database struct {
85
85
liveCompGauge * metrics.Gauge // Gauge for tracking the number of in-progress compactions
86
86
liveCompSizeGauge * metrics.Gauge // Gauge for tracking the size of in-progress compactions
87
87
levelsGauge []* metrics.Gauge // Gauge for tracking the number of tables in levels
88
- readExistedCount * metrics.Counter // Counter for tracking the number of existed keys readed
89
- readNotfoundCount * metrics.Counter // Counter for tracking the number of notfound keys readed
88
+ readExistCount * metrics.Counter // Counter for tracking the number of existed keys readed
89
+ readInexCount * metrics.Counter // Counter for tracking the number of notfound keys readed
90
90
writeCount * metrics.Counter // Counter for tracking the number of written
91
- readExistedTime * metrics.ResettingTimer // Timer for tracking the time spent on reading existed keys
92
- readNotfoundTime * metrics.ResettingTimer // Timer for tracking the time spent on reading notfound keys
91
+ readExistTime * metrics.ResettingTimer // Timer for tracking the time spent on reading existed keys
92
+ readInexTime * metrics.ResettingTimer // Timer for tracking the time spent on reading notfound keys
93
93
writeTime * metrics.ResettingTimer // Timer for tracking the time spent on writing
94
94
95
95
quitLock sync.RWMutex // Mutex protecting the quit channel and the closed flag
@@ -332,11 +332,11 @@ func (d *Database) Has(key []byte) (bool, error) {
332
332
st := time .Now ()
333
333
_ , closer , err := d .db .Get (key )
334
334
if err == nil {
335
- d .readExistedTime .Update (time .Since (st ))
336
- d .readExistedCount .Inc (1 )
335
+ d .readExistTime .Update (time .Since (st ))
336
+ d .readExistCount .Inc (1 )
337
337
} else if err == pebble .ErrNotFound {
338
- d .readNotfoundTime .Update (time .Since (st ))
339
- d .readNotfoundCount .Inc (1 )
338
+ d .readInexTime .Update (time .Since (st ))
339
+ d .readInexCount .Inc (1 )
340
340
}
341
341
342
342
if err == pebble .ErrNotFound {
@@ -361,11 +361,11 @@ func (d *Database) Get(key []byte) ([]byte, error) {
361
361
st := time .Now ()
362
362
dat , closer , err := d .db .Get (key )
363
363
if err == nil {
364
- d .readExistedTime .Update (time .Since (st ))
365
- d .readExistedCount .Inc (1 )
364
+ d .readExistTime .Update (time .Since (st ))
365
+ d .readExistCount .Inc (1 )
366
366
} else if err == pebble .ErrNotFound {
367
- d .readNotfoundTime .Update (time .Since (st ))
368
- d .readNotfoundCount .Inc (1 )
367
+ d .readInexTime .Update (time .Since (st ))
368
+ d .readInexCount .Inc (1 )
369
369
}
370
370
371
371
if err != nil {
@@ -517,11 +517,11 @@ func (d *Database) registerMetrics(namespace string) {
517
517
d .estimatedCompDebtGauge = metrics .GetOrRegisterGauge (namespace + "compact/estimateDebt" , nil )
518
518
d .liveCompGauge = metrics .GetOrRegisterGauge (namespace + "compact/live/count" , nil )
519
519
d .liveCompSizeGauge = metrics .GetOrRegisterGauge (namespace + "compact/live/size" , nil )
520
- d .readExistedCount = metrics .GetOrRegisterCounter (namespace + "read/existed /count" , nil )
521
- d .readNotfoundCount = metrics .GetOrRegisterCounter (namespace + "read/notfound /count" , nil )
520
+ d .readExistCount = metrics .GetOrRegisterCounter (namespace + "read/exist /count" , nil )
521
+ d .readInexCount = metrics .GetOrRegisterCounter (namespace + "read/inex /count" , nil )
522
522
d .writeCount = metrics .GetOrRegisterCounter (namespace + "write/count" , nil )
523
- d .readExistedTime = metrics .NewRegisteredResettingTimer (namespace + "read/existed /duration" , nil )
524
- d .readNotfoundTime = metrics .NewRegisteredResettingTimer (namespace + "read/notfound /duration" , nil )
523
+ d .readExistTime = metrics .NewRegisteredResettingTimer (namespace + "read/exist /duration" , nil )
524
+ d .readInexTime = metrics .NewRegisteredResettingTimer (namespace + "read/inex /duration" , nil )
525
525
d .writeTime = metrics .NewRegisteredResettingTimer (namespace + "write/duration" , nil )
526
526
}
527
527
0 commit comments