| 54 | } |
| 55 | |
| 56 | pub fn update_stats(&self, counters: &Arc<Counters>, rps: u64) { |
| 57 | let success = counters.success.load(Ordering::Relaxed); |
| 58 | let errors = counters.errors.load(Ordering::Relaxed); |
| 59 | let ratelimits = counters.ratelimits.load(Ordering::Relaxed); |
| 60 | |
| 61 | self.stats_pb.set_message(format!( |
| 62 | "Speed: {}/s | Success: {} | Errors: {} | Rate limits: {}", |
| 63 | rps, success, errors, ratelimits |
| 64 | )); |
| 65 | } |
| 66 | |
| 67 | pub fn update_hits(&self, hits: u64, latest_hit: Option<&str>) { |
| 68 | self.hits_pb.set_position(hits); |