diff --git a/cli/src/main.rs b/cli/src/main.rs index f402b0cb8..b60082dc6 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -26,7 +26,7 @@ fn main() -> ExitCode { rayon::ThreadPoolBuilder::new() .stack_size(8 * 1024 * 1024) - .thread_name(|i| format!("rayon-{i}")) + .thread_name(|_| "rayon_worker".to_string()) .build_global() .unwrap(); diff --git a/collator/src/collator/do_collate.rs b/collator/src/collator/do_collate.rs index 39cd941f0..7e2213b39 100644 --- a/collator/src/collator/do_collate.rs +++ b/collator/src/collator/do_collate.rs @@ -575,8 +575,8 @@ impl CollatorStdImpl { // block time diff from now let block_time_diff = { let diff_time = now_millis() as i64 - next_chain_time as i64; - metrics::histogram!("tycho_do_collate_block_diff_time", labels) - .record(diff_time as f64 / 1000.0); + metrics::gauge!("tycho_do_collate_block_time_diff", labels) + .set(diff_time as f64 / 1000.0); diff_time }; diff --git a/collator/src/state_node.rs b/collator/src/state_node.rs index 95b11fc1a..4b529c934 100644 --- a/collator/src/state_node.rs +++ b/collator/src/state_node.rs @@ -7,7 +7,6 @@ use everscale_types::boc::BocRepr; use everscale_types::models::*; use everscale_types::prelude::*; use tokio::sync::broadcast; -use tokio::time::Instant; use tycho_block_util::archive::ArchiveData; use tycho_block_util::block::{BlockProofStuff, BlockStuff, BlockStuffAug}; use tycho_block_util::state::ShardStateStuff; diff --git a/scripts/gen-dashboard.py b/scripts/gen-dashboard.py index f16033f12..9f295a505 100644 --- a/scripts/gen-dashboard.py +++ b/scripts/gen-dashboard.py @@ -387,15 +387,18 @@ def jrpc() -> RowPanel: def collator_finalize_block() -> RowPanel: metrics = [ create_heatmap_panel( - "tycho_collator_finalize_block_time", "Total time to finalize block", + "tycho_collator_finalize_block_time", + "Total time to finalize block", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_collator_finalize_build_account_blocks_time", "Build account blocks", + "tycho_collator_finalize_build_account_blocks_time", + "Build account blocks", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_collator_finalize_build_in_msgs_time", "Build InMsgDescr", + "tycho_collator_finalize_build_in_msgs_time", + "Build InMsgDescr", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( @@ -404,19 +407,23 @@ def collator_finalize_block() -> RowPanel: labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_collator_finish_build_mc_state_extra_time", "Build McStateExtra", + "tycho_collator_finish_build_mc_state_extra_time", + "Build McStateExtra", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_collator_finalize_build_state_update_time", "Compute MerkleUpdate", + "tycho_collator_finalize_build_state_update_time", + "Compute MerkleUpdate", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_collator_finalize_build_block_time", "Build Block", + "tycho_collator_finalize_build_block_time", + "Build Block", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_collator_finalize_build_new_state_time", "Build State", + "tycho_collator_finalize_build_new_state_time", + "Build State", labels=['workchain=~"$workchain"'], ), ] @@ -431,32 +438,35 @@ def collator_do_collate() -> RowPanel: labels=['workchain=~"$workchain"'], ), create_counter_panel( - "tycho_do_collate_msgs_exec_count_all", "All executed msgs count", + "tycho_do_collate_msgs_exec_count_all", + "All executed msgs count", labels=['workchain=~"$workchain"'], ), - create_counter_panel( - "tycho_collator_ext_msgs_imported_count", "Imported Ext msgs count from mempool", + "tycho_collator_ext_msgs_imported_count", + "Imported Ext msgs count from mempool", labels=['workchain=~"$workchain"'], ), create_counter_panel( - "tycho_do_collate_msgs_read_count_ext", "Read Ext msgs count", + "tycho_do_collate_msgs_read_count_ext", + "Read Ext msgs count", labels=['workchain=~"$workchain"'], ), create_counter_panel( - "tycho_do_collate_msgs_exec_count_ext", "Executed Ext msgs count", + "tycho_do_collate_msgs_exec_count_ext", + "Executed Ext msgs count", labels=['workchain=~"$workchain"'], ), - create_counter_panel( - "tycho_do_collate_msgs_read_count_int", "Read Int msgs count", + "tycho_do_collate_msgs_read_count_int", + "Read Int msgs count", labels=['workchain=~"$workchain"'], ), create_counter_panel( - "tycho_do_collate_msgs_exec_count_int", "Executed Int msgs count", + "tycho_do_collate_msgs_exec_count_int", + "Executed Int msgs count", labels=['workchain=~"$workchain"'], ), - create_counter_panel( "tycho_do_collate_new_msgs_created_count", "Created NewInt msgs count", @@ -468,70 +478,85 @@ def collator_do_collate() -> RowPanel: labels=['workchain=~"$workchain"'], ), create_counter_panel( - "tycho_do_collate_msgs_read_count_new_int", "Read NewInt msgs count", + "tycho_do_collate_msgs_read_count_new_int", + "Read NewInt msgs count", labels=['workchain=~"$workchain"'], ), create_counter_panel( - "tycho_do_collate_msgs_exec_count_new_int", "Executed NewInt msgs count", + "tycho_do_collate_msgs_exec_count_new_int", + "Executed NewInt msgs count", labels=['workchain=~"$workchain"'], ), - create_gauge_panel( - "tycho_session_iterator_messages_all", "Number of internals in the iterator", + "tycho_session_iterator_messages_all", + "Number of internals in the iterator", labels=['workchain=~"$workchain"'], ), create_gauge_panel( "tycho_do_collate_int_msgs_queue_calc", "Calculated Internal queue len" ), create_counter_panel( - "tycho_do_collate_int_enqueue_count", "Enqueued int msgs count", + "tycho_do_collate_int_enqueue_count", + "Enqueued int msgs count", ), create_counter_panel( - "tycho_do_collate_int_dequeue_count", "Dequeued int msgs count", + "tycho_do_collate_int_dequeue_count", + "Dequeued int msgs count", ), - - create_heatmap_panel( - "tycho_do_collate_block_diff_time", "Block time diff", + create_gauge_panel( + "tycho_do_collate_block_time_diff", + "Block time diff", + UNITS.SECONDS, labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_from_prev_block_time", "Time elapsed from prev block", + "tycho_do_collate_from_prev_block_time", + "Time elapsed from prev block", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_overhead_time", "Collation flow overhead", + "tycho_do_collate_overhead_time", + "Collation flow overhead", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_total_time", "Total collation time", + "tycho_do_collate_total_time", + "Total collation time", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_prepare_time", "Collation prepare time", + "tycho_do_collate_prepare_time", + "Collation prepare time", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_init_iterator_time", "Init iterator time", + "tycho_do_collate_init_iterator_time", + "Init iterator time", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_execute_time", "Execution time", + "tycho_do_collate_execute_time", + "Execution time", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_execute_tick_time", "Execute Tick special transactions", + "tycho_do_collate_execute_tick_time", + "Execute Tick special transactions", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_execute_tock_time", "Execute Tock special transactions", + "tycho_do_collate_execute_tock_time", + "Execute Tock special transactions", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_fill_msgs_total_time", "Fill messages time", + "tycho_do_collate_fill_msgs_total_time", + "Fill messages time", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_exec_msgs_total_time", "Execute messages time", + "tycho_do_collate_exec_msgs_total_time", + "Execute messages time", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( @@ -540,19 +565,23 @@ def collator_do_collate() -> RowPanel: labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_apply_queue_diff_time", "Apply message queue diff", + "tycho_do_collate_apply_queue_diff_time", + "Apply message queue diff", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_do_collate_handle_block_candidate_time", "Handle block candidate", + "tycho_do_collate_handle_block_candidate_time", + "Handle block candidate", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_collator_update_mc_data_time", "update mc data", + "tycho_collator_update_mc_data_time", + "update mc data", labels=['workchain=~"$workchain"'], ), create_heatmap_panel( - "tycho_collator_import_next_anchor_time", "import next anchor time", + "tycho_collator_import_next_anchor_time", + "import next anchor time", labels=['workchain=~"$workchain"'], ), create_heatmap_panel(