Skip to content

Commit

Permalink
better status messages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Aug 2, 2024
1 parent ed01510 commit 28c9d24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bbot/scanner/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion bbot/scanner/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 28c9d24

Please sign in to comment.