Skip to content

Commit 9f39f19

Browse files
committed
remove wal queue wait metric as it's not used by pebble yet
1 parent a67aac7 commit 9f39f19

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

ethdb/pebble/pebble.go

+1-8
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ type Database struct {
7777
commitCountMeter metrics.Meter
7878
commitTotalDurationMeter metrics.Meter
7979
commitSemaphoreWaitMeter metrics.Meter
80-
commitWALQueueWaitMeter metrics.Meter
8180
commitMemTableWriteStallMeter metrics.Meter
8281
commitL0ReadAmpWriteStallMeter metrics.Meter
8382
commitWALRotationMeter metrics.Meter
@@ -86,7 +85,6 @@ type Database struct {
8685
commitCount atomic.Int64
8786
commitTotalDuration atomic.Int64
8887
commitSemaphoreWait atomic.Int64
89-
commitWALQueueWait atomic.Int64
9088
commitMemTableWriteStall atomic.Int64
9189
commitL0ReadAmpWriteStall atomic.Int64
9290
commitWALRotation atomic.Int64
@@ -320,7 +318,6 @@ func New(file string, cache int, handles int, namespace string, readonly bool, e
320318
db.commitCountMeter = metrics.NewRegisteredMeter(namespace+"commit/counter", nil)
321319
db.commitTotalDurationMeter = metrics.NewRegisteredMeter(namespace+"commit/duration/total", nil)
322320
db.commitSemaphoreWaitMeter = metrics.NewRegisteredMeter(namespace+"commit/duration/semaphorewait", nil)
323-
db.commitWALQueueWaitMeter = metrics.NewRegisteredMeter(namespace+"commit/duration/walqueuewait", nil)
324321
db.commitMemTableWriteStallMeter = metrics.NewRegisteredMeter(namespace+"commit/duration/memtablewritestall", nil)
325322
db.commitL0ReadAmpWriteStallMeter = metrics.NewRegisteredMeter(namespace+"commit/duration/l0readampwritestall", nil)
326323
db.commitWALRotationMeter = metrics.NewRegisteredMeter(namespace+"commit/duration/walrotation", nil)
@@ -542,7 +539,6 @@ func (d *Database) meter(refresh time.Duration, namespace string) {
542539
commitCounts [2]int64
543540
commitTotalDurations [2]int64
544541
commitSemaphoreWaits [2]int64
545-
commitWALQueueWaits [2]int64
546542
commitMemTableWriteStalls [2]int64
547543
commitL0ReadAmpWriteStalls [2]int64
548544
commitWALRotations [2]int64
@@ -566,7 +562,6 @@ func (d *Database) meter(refresh time.Duration, namespace string) {
566562
commitCount = d.commitCount.Load()
567563
commitTotalDuration = d.commitTotalDuration.Load()
568564
commitSemaphoreWait = d.commitSemaphoreWait.Load()
569-
commitWALQueueWait = d.commitWALQueueWait.Load()
570565
commitMemTableWriteStall = d.commitMemTableWriteStall.Load()
571566
commitL0ReadAmpWriteStall = d.commitL0ReadAmpWriteStall.Load()
572567
commitWALRotation = d.commitWALRotation.Load()
@@ -624,7 +619,6 @@ func (d *Database) meter(refresh time.Duration, namespace string) {
624619
commitCounts[i%2] = commitCount
625620
commitTotalDurations[i%2] = commitTotalDuration
626621
commitSemaphoreWaits[i%2] = commitSemaphoreWait
627-
commitWALQueueWaits[i%2] = commitWALQueueWait
628622
commitMemTableWriteStalls[i%2] = commitMemTableWriteStall
629623
commitL0ReadAmpWriteStalls[i%2] = commitL0ReadAmpWriteStall
630624
commitWALRotations[i%2] = commitWALRotation
@@ -633,7 +627,6 @@ func (d *Database) meter(refresh time.Duration, namespace string) {
633627
d.commitCountMeter.Mark(commitCounts[i%2] - commitCounts[(i-1)%2])
634628
d.commitTotalDurationMeter.Mark(commitTotalDurations[i%2] - commitTotalDurations[(i-1)%2])
635629
d.commitSemaphoreWaitMeter.Mark(commitSemaphoreWaits[i%2] - commitSemaphoreWaits[(i-1)%2])
636-
d.commitWALQueueWaitMeter.Mark(commitWALQueueWaits[i%2] - commitWALQueueWaits[(i-1)%2])
637630
d.commitMemTableWriteStallMeter.Mark(commitMemTableWriteStalls[i%2] - commitMemTableWriteStalls[(i-1)%2])
638631
d.commitL0ReadAmpWriteStallMeter.Mark(commitL0ReadAmpWriteStalls[i%2] - commitL0ReadAmpWriteStalls[(i-1)%2])
639632
d.commitWALRotationMeter.Mark(commitWALRotations[i%2] - commitWALRotations[(i-1)%2])
@@ -704,11 +697,11 @@ func (b *batch) Write() error {
704697
b.db.commitCount.Add(1)
705698
b.db.commitTotalDuration.Add(int64(stats.TotalDuration))
706699
b.db.commitSemaphoreWait.Add(int64(stats.SemaphoreWaitDuration))
707-
b.db.commitWALQueueWait.Add(int64(stats.WALQueueWaitDuration))
708700
b.db.commitMemTableWriteStall.Add(int64(stats.MemTableWriteStallDuration))
709701
b.db.commitL0ReadAmpWriteStall.Add(int64(stats.L0ReadAmpWriteStallDuration))
710702
b.db.commitWALRotation.Add(int64(stats.WALRotationDuration))
711703
b.db.commitWait.Add(int64(stats.CommitWaitDuration))
704+
// TODO add metric for stats.WALQueueWaitDuration when it will be used by pebble (currently it is always 0)
712705
return nil
713706
}
714707

0 commit comments

Comments
 (0)