Skip to content

Commit

Permalink
fix: review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joske committed Mar 4, 2024
1 parent 2f3d112 commit 8c3bfba
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions node/consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ impl<N: Network> Consensus<N> {
pub async fn add_unconfirmed_solution(&self, solution: ProverSolution<N>) -> Result<()> {
#[cfg(feature = "metrics")]
{
metrics::increment_gauge(metrics::consensus::SOLUTIONS, 1f64);
metrics::increment_gauge(metrics::consensus::TRANSMISSIONS, 1f64);
metrics::increment_gauge(metrics::consensus::UNCONFIRMED_SOLUTIONS, 1f64);
metrics::increment_gauge(metrics::consensus::UNCONFIRMED_TRANSMISSIONS, 1f64);
}
// Process the unconfirmed solution.
{
Expand Down Expand Up @@ -272,8 +272,8 @@ impl<N: Network> Consensus<N> {
pub async fn add_unconfirmed_transaction(&self, transaction: Transaction<N>) -> Result<()> {
#[cfg(feature = "metrics")]
{
metrics::increment_gauge(metrics::consensus::TRANSACTIONS, 1f64);
metrics::increment_gauge(metrics::consensus::TRANSMISSIONS, 1f64);
metrics::increment_gauge(metrics::consensus::UNCONFIRMED_TRANSACTIONS, 1f64);
metrics::increment_gauge(metrics::consensus::UNCONFIRMED_TRANSMISSIONS, 1f64);
}
// Process the unconfirmed transaction.
{
Expand Down
12 changes: 6 additions & 6 deletions node/metrics/snarkOS-grafana.json
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "snarkos_consensus_transactions_total",
"expr": "snarkos_consensus_unconfirmed_transactions_total",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand All @@ -1566,7 +1566,7 @@
"useBackend": false
}
],
"title": "Total Transactions",
"title": "Total Unconfirmed Transactions",
"type": "timeseries"
},
{
Expand Down Expand Up @@ -1652,7 +1652,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "snarkos_consensus_solutions_total",
"expr": "snarkos_consensus_unconfirmed_solutions_total",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand All @@ -1662,7 +1662,7 @@
"useBackend": false
}
],
"title": "Total Solutions",
"title": "Total Unconfirmed Solutions",
"type": "timeseries"
},
{
Expand Down Expand Up @@ -1748,7 +1748,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "snarkos_consensus_transmissions_total",
"expr": "snarkos_consensus_unconfirmed_transmissions_total",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand All @@ -1758,7 +1758,7 @@
"useBackend": false
}
],
"title": "Total Transmissions",
"title": "Total Unconfirmed Transmissions",
"type": "timeseries"
},
{
Expand Down
12 changes: 6 additions & 6 deletions node/metrics/src/names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ pub(super) const GAUGE_NAMES: [&str; 18] = [
blocks::TRANSMISSIONS,
consensus::COMMITTED_CERTIFICATES,
consensus::LAST_COMMITTED_ROUND,
consensus::SOLUTIONS,
consensus::TRANSACTIONS,
consensus::TRANSMISSIONS,
consensus::UNCONFIRMED_SOLUTIONS,
consensus::UNCONFIRMED_TRANSACTIONS,
consensus::UNCONFIRMED_TRANSMISSIONS,
router::CONNECTED,
router::CANDIDATE,
router::RESTRICTED,
Expand Down Expand Up @@ -67,9 +67,9 @@ pub mod consensus {
pub const COMMITTED_CERTIFICATES: &str = "snarkos_consensus_committed_certificates_total";
pub const LAST_COMMITTED_ROUND: &str = "snarkos_consensus_last_committed_round";
pub const BLOCK_LATENCY: &str = "snarkos_consensus_block_latency_secs";
pub const TRANSACTIONS: &str = "snarkos_consensus_transactions_total";
pub const TRANSMISSIONS: &str = "snarkos_consensus_transmissions_total";
pub const SOLUTIONS: &str = "snarkos_consensus_solutions_total";
pub const UNCONFIRMED_TRANSACTIONS: &str = "snarkos_consensus_unconfirmed_transactions_total";
pub const UNCONFIRMED_TRANSMISSIONS: &str = "snarkos_consensus_unconfirmed_transmissions_total";
pub const UNCONFIRMED_SOLUTIONS: &str = "snarkos_consensus_unconfirmed_solutions_total";
}

pub mod router {
Expand Down

0 comments on commit 8c3bfba

Please sign in to comment.