Skip to content

Commit 3aee5be

Browse files
committed
reset metrics properly
1 parent 097e353 commit 3aee5be

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/vm/src/arch/vm.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,8 @@ where
10561056
let mut trace_heights = trace_heights.to_vec();
10571057
trace_heights[PUBLIC_VALUES_AIR_ID] = vm.config().as_ref().num_public_values as u32;
10581058
let state = self.state.take().expect("State should always be present");
1059+
#[cfg(feature = "metrics")]
1060+
let debug_infos = state.metrics.debug_infos.clone();
10591061
let num_custom_pvs = state.custom_pvs.len();
10601062
let (proof, final_memory) = vm.prove(&mut self.interpreter, state, None, &trace_heights)?;
10611063
let final_memory = final_memory.ok_or(ExecutionError::DidNotTerminate)?;
@@ -1068,6 +1070,10 @@ where
10681070
DEFAULT_RNG_SEED,
10691071
num_custom_pvs,
10701072
));
1073+
#[cfg(feature = "metrics")]
1074+
{
1075+
self.state.as_mut().unwrap().metrics.debug_infos = debug_infos;
1076+
}
10711077
Ok(proof)
10721078
}
10731079
}

0 commit comments

Comments
 (0)