Skip to content

Commit

Permalink
increment before reset
Browse files Browse the repository at this point in the history
  • Loading branch information
korewaChino committed Dec 4, 2024
1 parent 29edd8e commit ffd57e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions skystreamer-prometheus-exporter/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,11 @@ async fn main() -> Result<()> {
// let mut last_tick = tokio::time::Instant::now();

while let Some(_post) = stream.next().await {
counter.inc();

if counter.get() > max_sample_size as f64 {
counter.reset();
}

counter.inc();
// println!("Rate: {}", counter.get());
}
}

Expand Down

0 comments on commit ffd57e2

Please sign in to comment.