Skip to content

Commit

Permalink
*: update prometheus and fix compile error (tikv#1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
siddontang authored Nov 29, 2016
1 parent 567a636 commit f0424a4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions src/pd/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ use prometheus::{Histogram, exponential_buckets};
lazy_static! {
pub static ref PD_SEND_MSG_HISTOGRAM: Histogram =
register_histogram!(
histogram_opts!{
"tikv_pd_msg_send_duration_seconds",
"Bucketed histogram of PD message send duration",
[ exponential_buckets(0.0005, 10.0, 7).unwrap() ]
}
"tikv_pd_msg_send_duration_seconds",
"Bucketed histogram of PD message send duration",
exponential_buckets(0.0005, 10.0, 7).unwrap()
).unwrap();
}
10 changes: 4 additions & 6 deletions src/raftstore/store/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ lazy_static! {

pub static ref PEER_PROPOSE_LOG_SIZE_HISTOGRAM: Histogram =
register_histogram!(
histogram_opts!{
"tikv_raftstore_propose_log_size",
"Bucketed histogram of peer proposing log size",
[ vec![256.0, 512.0, 1024.0, 4096.0, 65536.0, 262144.0, 524288.0, 1048576.0,
2097152.0, 4194304.0, 8388608.0, 16777216.0] ]
}
"tikv_raftstore_propose_log_size",
"Bucketed histogram of peer proposing log size",
vec![256.0, 512.0, 1024.0, 4096.0, 65536.0, 262144.0, 524288.0, 1048576.0,
2097152.0, 4194304.0, 8388608.0, 16777216.0]
).unwrap();

pub static ref REGION_HASH_COUNTER_VEC: CounterVec =
Expand Down
9 changes: 4 additions & 5 deletions src/storage/engine/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ lazy_static! {

pub static ref ASYNC_REQUESTS_DURATIONS_VEC: HistogramVec =
register_histogram_vec!(
histogram_opts!(
"tikv_storage_engine_async_request_duration_seconds",
"Bucketed histogram of processing successful asynchronous requests.",
[exponential_buckets(0.0005, 2.0, 20).unwrap()]),
&["type"]
"tikv_storage_engine_async_request_duration_seconds",
"Bucketed histogram of processing successful asynchronous requests.",
&["type"],
exponential_buckets(0.0005, 2.0, 20).unwrap()
).unwrap();

pub static ref CURSOR_OVER_SEEK_BOUND_COUNTER: Counter =
Expand Down
18 changes: 7 additions & 11 deletions src/storage/mvcc/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,16 @@ use prometheus::{Histogram, exponential_buckets};
lazy_static! {
pub static ref MVCC_VERSIONS_HISTOGRAM: Histogram =
register_histogram!(
histogram_opts!{
"tikv_storage_mvcc_versions",
"Histogram of versions for each key",
[ vec![1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 50.0, 100.0,
500.0, 1000.0, 5000.0, 10000.0, 50000.0, 100000.0] ]
}
"tikv_storage_mvcc_versions",
"Histogram of versions for each key",
vec![1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 50.0, 100.0,
500.0, 1000.0, 5000.0, 10000.0, 50000.0, 100000.0]
).unwrap();

pub static ref GC_DELETE_VERSIONS_HISTOGRAM: Histogram =
register_histogram!(
histogram_opts!{
"tikv_storage_mvcc_gc_delete_versions",
"Histogram of versions deleted by gc for each key",
[ exponential_buckets(1.0, 2.0, 10).unwrap() ]
}
"tikv_storage_mvcc_gc_delete_versions",
"Histogram of versions deleted by gc for each key",
exponential_buckets(1.0, 2.0, 10).unwrap()
).unwrap();
}

0 comments on commit f0424a4

Please sign in to comment.