-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: hillium <[email protected]>
- Loading branch information
Showing
7 changed files
with
121 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package metrics | ||
|
||
import "github.com/prometheus/client_golang/prometheus" | ||
|
||
var ( | ||
RestoreImportFileSeconds prometheus.Histogram | ||
RestoreUploadSSTForPiTRSeconds prometheus.Histogram | ||
) | ||
|
||
func InitBRMetrics() { | ||
RestoreImportFileSeconds = prometheus.NewHistogram(prometheus.HistogramOpts{ | ||
Namespace: "tidb", | ||
Subsystem: "br", | ||
Name: "restore_import_file_seconds", | ||
|
||
Help: "The time cost for importing a file (send it to a file's all peers and put metadata)", | ||
|
||
Buckets: prometheus.ExponentialBuckets(0.01, 2, 14), | ||
}) | ||
|
||
RestoreUploadSSTForPiTRSeconds = prometheus.NewHistogram(prometheus.HistogramOpts{ | ||
Namespace: "tidb", | ||
Subsystem: "br", | ||
Name: "restore_upload_sst_for_pitr_seconds", | ||
|
||
Help: "The time cost for uploading SST files for point-in-time recovery", | ||
|
||
Buckets: prometheus.DefBuckets, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters