cfxcore/consensus/
statistics.rs1#[derive(Debug)]
2pub struct ConsensusGraphStatistics {
3 pub inserted_block_count: usize,
4 pub activated_block_count: usize,
5 pub processed_block_count: usize,
6}
7
8impl ConsensusGraphStatistics {
9 pub fn new() -> ConsensusGraphStatistics {
10 ConsensusGraphStatistics {
11 inserted_block_count: 0,
12 activated_block_count: 0,
13 processed_block_count: 0,
14 }
15 }
16
17 pub fn clear(&mut self) {
18 self.inserted_block_count = 0;
19 self.activated_block_count = 0;
20 self.processed_block_count = 0;
21 }
22}