Skip to content

Commit

Permalink
feat(scripts): add dashboard generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexagon committed Jun 10, 2024
1 parent b085d11 commit 4252648
Show file tree
Hide file tree
Showing 5 changed files with 405 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ target/
.idea/
.vscode/
.fleet/
.venv

perf.data*
.scratch
Expand Down
11 changes: 8 additions & 3 deletions collator/src/collator/do_collate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ impl CollatorStdImpl {
msgs_set_full_processed = finished;
let one_tick_executed_count = group.len();

collation_data.tx_count += group.len() as u32;

do_collate_exec_msgs_elapsed += timer.elapsed();
timer = std::time::Instant::now();

Expand Down Expand Up @@ -476,11 +478,14 @@ impl CollatorStdImpl {
// metrics
let labels = [("workchain", self.shard_id.workchain().to_string())];

metrics::counter!("tycho_do_collate_msgs_exec_count_all_sum", &labels)
metrics::counter!("tycho_do_collate_msgs_exec_count_all_total", &labels)
.increment(collation_data.execute_count_all as _);
metrics::counter!("tycho_do_collate_msgs_exec_count_ext_sum", &labels)
metrics::counter!("tycho_do_collate_msgs_exec_count_ext_total", &labels)
.increment(collation_data.execute_count_ext as _);

metrics::counter!("tycho_do_collate_tx_total", &labels)
.increment(collation_data.tx_count as _);

metrics::histogram!("tycho_do_collate_msgs_exec_count_all", &labels)
.record(collation_data.execute_count_all);
metrics::histogram!("tycho_do_collate_msgs_exec_count_ext", &labels)
Expand All @@ -493,7 +498,7 @@ impl CollatorStdImpl {
metrics::gauge!("tycho_do_collate_int_msgs_queue_length", &labels)
.increment(collation_data.enqueue_count);
metrics::gauge!("tycho_do_collate_int_msgs_queue_length", &labels)
.decrement(collation_data.enqueue_count);
.decrement(collation_data.dequeue_count);

let do_collate_execute_elapsed = do_collate_fill_msgs_set_elapsed
+ do_collate_exec_msgs_elapsed
Expand Down
1 change: 1 addition & 0 deletions collator/src/collator/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ pub(super) struct BlockCollationData {
pub execute_count_new_int: u32,
pub enqueue_count: u32,
pub dequeue_count: u32,
pub tx_count: u32,

pub start_lt: u64,
// Should be updated on each tx finalization from ExecutionManager.max_lt
Expand Down
Loading

0 comments on commit 4252648

Please sign in to comment.