Skip to content
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
7 changes: 4 additions & 3 deletions stratum-apps/src/monitoring/http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ async fn handle_prometheus_metrics(State(state): State<ServerState>) -> Response
if let Some(ref metric) = state.metrics.sv2_server_shares_accepted_total {
metric
.with_label_values(&[&channel_id, user])
.set(channel.shares_accepted as f64);
.set(channel.shares_acknowledged as f64);
}
if let (Some(ref metric), Some(hashrate)) = (
&state.metrics.sv2_server_channel_hashrate,
Expand Down Expand Up @@ -1015,9 +1015,10 @@ mod tests {
nominal_hashrate: hashrate,
target_hex: "00ff".into(),
extranonce_prefix_hex: "bb".into(),
shares_accepted: 20,
share_work_sum: 200.0,
shares_acknowledged: 20,
shares_submitted: 22,
shares_rejected: 1,
share_work_sum: 200.0,
best_diff: 80.0,
blocks_found: 0,
}
Expand Down
10 changes: 6 additions & 4 deletions stratum-apps/src/monitoring/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ pub struct ServerStandardChannelInfo {
pub nominal_hashrate: Option<f32>,
pub target_hex: String,
pub extranonce_prefix_hex: String,
pub shares_accepted: u32,
pub share_work_sum: f64,
pub shares_acknowledged: u32,
pub shares_submitted: u32,
pub shares_rejected: u32,
pub share_work_sum: f64,
pub best_diff: f64,
pub blocks_found: u32,
}
Expand Down Expand Up @@ -134,9 +135,10 @@ mod tests {
nominal_hashrate: hashrate,
target_hex: "00ff".into(),
extranonce_prefix_hex: "bb".into(),
shares_accepted: 20,
share_work_sum: 200.0,
shares_acknowledged: 20,
shares_submitted: 22,
shares_rejected: 1,
share_work_sum: 200.0,
best_diff: 80.0,
blocks_found: 0,
}
Expand Down
Loading