This repository was archived by the owner on Sep 13, 2022. It is now read-only.
File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ All current metrics and usage
9
9
| muta_api_request_time_cost_seconds | histogram | |
10
10
11
11
12
- ## Consensus
12
+ ## Consensus
13
13
<table >
14
14
<thead >
15
15
<tr >
@@ -37,6 +37,11 @@ All current metrics and usage
37
37
<td>gauge</td>
38
38
<td>consensus_round_cost</td>
39
39
</tr >
40
+ <tr >
41
+ <td>muta_executing_queue</td>
42
+ <td>gauge</td>
43
+ <td>executing_block_size</td>
44
+ </tr >
40
45
<tr >
41
46
<td rowspan="3">muta_consensus_height</td>
42
47
<td rowspan="3">gauge</td>
Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ lazy_static! {
65
65
register_int_gauge!( "muta_consensus_round" , "Round count of consensus" ) . unwrap( ) ;
66
66
pub static ref ENGINE_HEIGHT_GAUGE : IntGauge =
67
67
register_int_gauge!( "muta_consensus_height" , "Height of muta" ) . unwrap( ) ;
68
+ pub static ref ENGINE_EXECUTING_BLOCK_GAUGE : IntGauge =
69
+ register_int_gauge!( "muta_executing_block_count" , "The executing blocks" ) . unwrap( ) ;
68
70
pub static ref ENGINE_COMMITED_TX_COUNTER : IntCounter = register_int_counter!(
69
71
"muta_consensus_committed_tx_total" ,
70
72
"The committed transactions"
Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ impl CurrentConsensusStatus {
117
117
self . list_confirm_root . push ( info. confirm_root . clone ( ) ) ;
118
118
self . list_receipt_root . push ( info. receipt_root . clone ( ) ) ;
119
119
self . list_state_root . push ( info. state_root ) ;
120
+
121
+ common_apm:: metrics:: consensus:: ENGINE_EXECUTING_BLOCK_GAUGE
122
+ . set ( self . latest_committed_height as i64 - self . exec_height as i64 ) ;
120
123
}
121
124
122
125
pub ( crate ) fn update_by_committed (
@@ -136,6 +139,9 @@ impl CurrentConsensusStatus {
136
139
self . latest_committed_state_root = block. header . state_root . clone ( ) ;
137
140
138
141
self . split_off ( & block) ;
142
+
143
+ common_apm:: metrics:: consensus:: ENGINE_EXECUTING_BLOCK_GAUGE
144
+ . set ( ( self . latest_committed_height - self . exec_height ) as i64 ) ;
139
145
}
140
146
141
147
pub ( crate ) fn set_metadata ( & mut self , metadata : Metadata ) {
You can’t perform that action at this time.
0 commit comments