1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
use prometheus::*;
lazy_static! {
pub static ref IMPORT_RPC_DURATION: HistogramVec = register_histogram_vec!(
"tikv_import_rpc_duration",
"Bucketed histogram of import rpc duration",
&["request", "result"],
exponential_buckets(0.01, 2.0, 20).unwrap()
)
.unwrap();
pub static ref IMPORT_UPLOAD_CHUNK_BYTES: Histogram = register_histogram!(
"tikv_import_upload_chunk_bytes",
"Bucketed histogram of import upload chunk bytes",
exponential_buckets(1024.0, 2.0, 20).unwrap()
)
.unwrap();
pub static ref IMPORT_UPLOAD_CHUNK_DURATION: Histogram = register_histogram!(
"tikv_import_upload_chunk_duration",
"Bucketed histogram of import upload chunk duration",
exponential_buckets(0.01, 2.0, 20).unwrap()
)
.unwrap();
pub static ref IMPORT_WRITE_CHUNK_DURATION: Histogram = register_histogram!(
"tikv_import_write_chunk_duration",
"Bucketed histogram of import write chunk duration",
exponential_buckets(0.01, 2.0, 20).unwrap()
)
.unwrap();
pub static ref IMPORTER_DOWNLOAD_DURATION: HistogramVec = register_histogram_vec!(
"tikv_import_download_duration",
"Bucketed histogram of importer download duration",
&["type"],
exponential_buckets(0.01, 2.0, 20).unwrap()
)
.unwrap();
pub static ref IMPORTER_DOWNLOAD_BYTES: Histogram = register_histogram!(
"tikv_import_download_bytes",
"Bucketed histogram of importer download bytes",
exponential_buckets(1024.0, 2.0, 20).unwrap()
)
.unwrap();
pub static ref IMPORTER_INGEST_DURATION: HistogramVec = register_histogram_vec!(
"tikv_import_ingest_duration",
"Bucketed histogram of importer ingest duration",
&["type"],
exponential_buckets(0.01, 2.0, 20).unwrap()
)
.unwrap();
pub static ref IMPORTER_INGEST_BYTES: Histogram = register_histogram!(
"tikv_import_ingest_bytes",
"Bucketed histogram of importer ingest bytes",
exponential_buckets(1024.0, 2.0, 20).unwrap()
)
.unwrap();
pub static ref IMPORTER_ERROR_VEC: IntCounterVec = register_int_counter_vec!(
"tikv_import_error_counter",
"Total number of importer errors",
&["type", "error"]
)
.unwrap();
}