Skip to content

Commit

Permalink
Register counters for cache access
Browse files Browse the repository at this point in the history
  • Loading branch information
popzxc committed Mar 23, 2022
1 parent 256c065 commit c0fb626
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/bin/zksync_witness_generator/src/witness_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ impl<DB: DatabaseInterface> WitnessGenerator<DB> {
*self.start_block,
*self.block_step
);

// Initialize counters for cache hits/misses.
metrics::register_counter!("witness_generator.cache_access", "type" => "hit");
metrics::register_counter!("witness_generator.cache_access", "type" => "miss");

let mut current_block = self.start_block;
loop {
sleep(self.rounds_interval).await;
Expand Down

0 comments on commit c0fb626

Please sign in to comment.