Skip to content

Commit

Permalink
metrics: add asynchronous write io panels (tikv#11408)
Browse files Browse the repository at this point in the history
* update metrics name

Signed-off-by: gengliqi <gengliqiii@gmail.com>

* update tikv-details & close tikv#10540

Signed-off-by: gengliqi <gengliqiii@gmail.com>

* rename Raft GC to Raft Log GC

Signed-off-by: gengliqi <gengliqiii@gmail.com>

* address comment

Signed-off-by: gengliqi <gengliqiii@gmail.com>

* fix datasource

Signed-off-by: gengliqi <gengliqiii@gmail.com>

* add more metrics

Signed-off-by: gengliqi <gengliqiii@gmail.com>

* update metrics

Signed-off-by: gengliqi <gengliqiii@gmail.com>

* update

Signed-off-by: gengliqi <gengliqiii@gmail.com>
  • Loading branch information
gengliqi authored and you06 committed Nov 23, 2021
1 parent df3df53 commit 3f0ef8e
Show file tree
Hide file tree
Showing 3 changed files with 4,006 additions and 1,237 deletions.
2 changes: 2 additions & 0 deletions components/raftstore/src/store/async_io/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,8 @@ where
}

let total_cost = now.saturating_duration_since(timer);
STORE_WRITE_TO_DB_DURATION_HISTOGRAM.observe(duration_to_sec(total_cost));

slow_log!(
total_cost,
"[store {}] async write too slow, write_kv: {}s, write_raft: {}s, send: {}s, callback: {}s thread: {}",
Expand Down
12 changes: 9 additions & 3 deletions components/raftstore/src/store/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ lazy_static! {
).unwrap();
pub static ref STORE_WRITE_RAFTDB_DURATION_HISTOGRAM: Histogram =
register_histogram!(
"tikv_raftstore_append_log_duration_seconds",
"Bucketed histogram of peer appending log duration.",
exponential_buckets(0.0005, 2.0, 20).unwrap()
"tikv_raftstore_store_write_raftdb_duration_seconds",
"Bucketed histogram of store write raft db duration.",
exponential_buckets(0.00001, 2.0, 26).unwrap()
).unwrap();
pub static ref STORE_WRITE_SEND_DURATION_HISTOGRAM: Histogram =
register_histogram!(
Expand All @@ -274,6 +274,12 @@ lazy_static! {
"Bucketed histogram of sending callback to store thread duration.",
exponential_buckets(0.00001, 2.0, 26).unwrap()
).unwrap();
pub static ref STORE_WRITE_TO_DB_DURATION_HISTOGRAM: Histogram =
register_histogram!(
"tikv_raftstore_append_log_duration_seconds",
"Bucketed histogram of peer appending log duration.",
exponential_buckets(0.00001, 2.0, 26).unwrap()
).unwrap();
pub static ref STORE_WRITE_LOOP_DURATION_HISTOGRAM: Histogram =
register_histogram!(
"tikv_raftstore_store_write_loop_duration_seconds",
Expand Down
Loading

0 comments on commit 3f0ef8e

Please sign in to comment.