From 28c9d2405afe644fc22421c44f1eb05592b24c7e Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 2 Aug 2024 00:56:12 -0400 Subject: [PATCH] better status messages --- bbot/scanner/scanner.py | 4 ++-- bbot/scanner/stats.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bbot/scanner/scanner.py b/bbot/scanner/scanner.py index 0fe4191bf..84c028040 100644 --- a/bbot/scanner/scanner.py +++ b/bbot/scanner/scanner.py @@ -642,11 +642,11 @@ def modules_status(self, _log=False): num_queued_events = self.num_queued_events if num_queued_events: self.info( - f"{self.name}: {num_queued_events:,} events in queue ({self.stats.speedometer.speed:,} processed in the past minute)" + f"{self.name}: {num_queued_events:,} events in queue ({self.stats.speedometer.speed:,} processed since the last message)" ) else: self.info( - f"{self.name}: No events in queue ({self.stats.speedometer.speed:,} processed in the past minute)" + f"{self.name}: No events in queue ({self.stats.speedometer.speed:,} processed since the last message)" ) if self.log_level <= logging.DEBUG: diff --git a/bbot/scanner/stats.py b/bbot/scanner/stats.py index 6ae86c044..38d95032f 100644 --- a/bbot/scanner/stats.py +++ b/bbot/scanner/stats.py @@ -41,7 +41,7 @@ def __init__(self, scan): self.scan = scan self.module_stats = {} self.events_emitted_by_type = {} - self.speedometer = SpeedCounter(60) + self.speedometer = SpeedCounter(scan.status_frequency) def event_produced(self, event): _increment(self.events_emitted_by_type, event.type)