Skip to content

Commit 7df546c

Browse files
committed
fix metric for diff sync size
1 parent 8540515 commit 7df546c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

chotki.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,18 @@ var DrainTime = prometheus.NewHistogramVec(prometheus.HistogramOpts{
7575
}, []string{"type"})
7676

7777
// Size of diff sync in bytes
78-
var DiffSyncSize = prometheus.NewHistogramVec(prometheus.HistogramOpts{
78+
var DiffSyncSize = prometheus.NewHistogram(prometheus.HistogramOpts{
7979
Namespace: "chotki",
8080
Name: "diff_sync_size",
81-
Buckets: []float64{1, 10, 50, 100, 500, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000},
82-
}, []string{"id"})
81+
Buckets: []float64{
82+
1, 10, 100, 1000,
83+
5000, 10000, 50000, 100000, 500000,
84+
1000000, 2000000, 5000000, 10000000,
85+
20000000, 50000000, 100000000,
86+
200000000, 500000000, 1000000000,
87+
2000000000, 5000000000,
88+
},
89+
})
8390

8491
type Options struct {
8592
pebble.Options
@@ -769,7 +776,7 @@ func (cho *Chotki) drain(ctx context.Context, recs protocol.Records) (err error)
769776
if !ok {
770777
return ErrSyncUnknown
771778
}
772-
DiffSyncSize.WithLabelValues(id.String()).Observe(float64(s.batch.Len()))
779+
DiffSyncSize.Observe(float64(s.batch.Len()))
773780
// update blocks version vectors
774781
err = cho.ApplyV(id, ref, body, s.batch)
775782
if err == nil {

0 commit comments

Comments
 (0)