Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
*: add apply worker metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
lonng committed Dec 27, 2018
1 parent 1880258 commit 6baedce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lightning/metric/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ var (
Buckets: prometheus.ExponentialBuckets(0.001, 3.1622776601683795, 10),
},
)
ApplyWorkerSecondsHistogram = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Namespace: "lightning",
Name: "apply_worker_seconds",
Help: "time needed to apply a worker",
Buckets: prometheus.ExponentialBuckets(0.001, 3.1622776601683795, 10),
}, []string{"name"},
)
BlockEncodeSecondsHistogram = prometheus.NewHistogram(
prometheus.HistogramOpts{
Namespace: "lightning",
Expand Down Expand Up @@ -167,6 +175,7 @@ func init() {
prometheus.MustRegister(ChecksumSecondsHistogram)
prometheus.MustRegister(ChunkParserReadRowSecondsHistogram)
prometheus.MustRegister(ChunkParserReadBlockSecondsHistogram)
prometheus.MustRegister(ApplyWorkerSecondsHistogram)
}

func RecordTableCount(status string, err error) {
Expand Down

0 comments on commit 6baedce

Please sign in to comment.