Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add protocol_version label to WG jobs metric #2009

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions core/node/house_keeper/src/prover/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ impl From<&str> for WitnessType {
pub(crate) struct ServerMetrics {
pub prover_fri_requeued_jobs: Counter<u64>,
pub requeued_jobs: Family<WitnessType, Counter<u64>>,
#[metrics(labels = ["type", "round"])]
pub witness_generator_jobs_by_round: LabeledFamily<(&'static str, String), Gauge<u64>, 2>,
#[metrics(labels = ["type", "round", "protocol_version"])]
pub witness_generator_jobs_by_round:
LabeledFamily<(&'static str, String, String), Gauge<u64>, 3>,
#[metrics(labels = ["type", "protocol_version"])]
pub witness_generator_jobs: LabeledFamily<(&'static str, String), Gauge<u64>, 2>,
pub leaf_fri_witness_generator_waiting_to_queued_jobs_transitions: Counter<u64>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,17 @@ fn emit_metrics_for_round(round: AggregationRound, stats: JobCountStatistics) {
);
}

SERVER_METRICS.witness_generator_jobs_by_round[&("queued", format!("{:?}", round))]
SERVER_METRICS.witness_generator_jobs_by_round[&(
"queued",
format!("{:?}", round),
ProtocolVersionId::current_prover_version().to_string(),
)]
.set(stats.queued as u64);
SERVER_METRICS.witness_generator_jobs_by_round[&("in_progress", format!("{:?}", round))]
SERVER_METRICS.witness_generator_jobs_by_round[&(
"in_progress",
format!("{:?}", round),
ProtocolVersionId::current_prover_version().to_string(),
)]
.set(stats.queued as u64);
}

Expand Down
Loading