Skip to content

Commit

Permalink
chore: cleanup metric emission labels (#1004)
Browse files Browse the repository at this point in the history
* chore: cleanup metric emission labels

* Apply suggestions from code review

Co-authored-by: Yi Sun <[email protected]>

---------

Co-authored-by: Yi Sun <[email protected]>
  • Loading branch information
jonathanpwang and yi-sun authored Dec 12, 2024
1 parent 0c37b68 commit 93a0a33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions crates/axvm-sdk/src/prover/agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl AggStarkProver {
&proofs,
self.num_children_internal,
);
let group = format!("internal_verifier_height_{}", internal_node_height);
let group = format!("internal_{}", internal_node_height);
proofs = info_span!("internal verifier", group = group).in_scope(|| {
#[cfg(feature = "bench-metrics")]
metrics::counter!("fri.log_blowup")
Expand All @@ -153,8 +153,8 @@ impl AggStarkProver {
internal_node_idx += 1;
info_span!(
"Internal verifier proof",
index = internal_node_idx,
height = internal_node_height
idx = internal_node_idx,
hgt = internal_node_height
)
.in_scope(|| {
single_segment_prove(&self.internal_prover, input.write(), self.profile)
Expand All @@ -168,7 +168,7 @@ impl AggStarkProver {
}

fn generate_root_proof_impl(&self, root_input: RootVmVerifierInput<SC>) -> Proof<RootSC> {
info_span!("root verifier", group = "root_verifier").in_scope(|| {
info_span!("root verifier", group = "root").in_scope(|| {
let input = root_input.write();
#[cfg(feature = "bench-metrics")]
metrics::counter!("fri.log_blowup").absolute(
Expand Down Expand Up @@ -220,7 +220,7 @@ impl LeafProver {
self
}
pub fn generate_proof(&self, app_proofs: &ContinuationVmProof<SC>) -> Vec<Proof<SC>> {
info_span!("leaf verifier", group = "leaf_verifier").in_scope(|| {
info_span!("leaf verifier", group = "leaf").in_scope(|| {
#[cfg(feature = "bench-metrics")]
metrics::counter!("fri.log_blowup")
.absolute(self.prover.pk.fri_params.log_blowup as u64);
Expand All @@ -232,7 +232,7 @@ impl LeafProver {
.into_iter()
.enumerate()
.map(|(leaf_node_idx, input)| {
info_span!("leaf verifier proof", index = leaf_node_idx).in_scope(|| {
info_span!("leaf verifier proof", idx = leaf_node_idx).in_scope(|| {
single_segment_prove(&self.prover, input.write_to_stream(), self.profile)
})
})
Expand Down
4 changes: 2 additions & 2 deletions crates/axvm-sdk/src/prover/halo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ impl Halo2Prover {
pub fn prove_for_evm(&self, root_proof: &Proof<RootSC>) -> EvmProof {
let mut witness = Witness::default();
root_proof.write(&mut witness);
let snark = info_span!("halo2 verifier", group = "halo2_verifier").in_scope(|| {
let snark = info_span!("halo2 outer recursion", group = "halo2_outer").in_scope(|| {
self.halo2_pk
.verifier
.prove_with_loaded_params(&self.verifier_srs, witness)
});
info_span!("halo2 wrapper", group = "halo2_wrapper").in_scope(|| {
info_span!("halo2_wrapper", group = "halo2_wrapper").in_scope(|| {
self.halo2_pk
.wrapper
.prove_for_evm_with_loaded_params(&self.wrapper_srs, snark)
Expand Down
3 changes: 1 addition & 2 deletions crates/vm/src/arch/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,7 @@ where
pk: &MultiStarkProvingKey<SC>,
proof_input: ProofInput<SC>,
) -> Proof<SC> {
tracing::info_span!("prove_segment", segment = 0)
.in_scope(|| self.engine.prove(pk, proof_input))
self.engine.prove(pk, proof_input)
}

pub fn prove(
Expand Down

0 comments on commit 93a0a33

Please sign in to comment.