Skip to content

Commit

Permalink
Include new stats in the /stats output
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtlmoon committed Sep 28, 2024
1 parent 1704d20 commit 1662a94
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions backend/http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ async def handle_http_request(request, stats):
data = {
'active_connections': stats['connection_count'],
'connection_count_total': stats['connection_count_total'],
'dropped_threshold_reached': stats['dropped_threshold_reached'],
'dropped_waited_too_long': stats['dropped_waited_too_long'],
'mem_use_percent': svmem.percent,
'special_counter_len': len(stats['special_counter'])
}
Expand Down
16 changes: 9 additions & 7 deletions backend/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
import time
import websockets

stats = {'connection_count': 0,
'connection_count_total': 0,
'confirmed_data_received': 0,
'special_counter': [],
'dropped_waited_too_long': 0,
'dropped_threshold_reached': 0,
}
stats = {
'confirmed_data_received': 0,
'connection_count': 0,
'connection_count_total': 0,
'dropped_threshold_reached': 0,
'dropped_waited_too_long': 0,
'special_counter': [],
}

connection_count_max = int(os.getenv('MAX_CONCURRENT_CHROME_PROCESSES', 10))
port_selector = PortSelector()
shutdown = False
Expand Down

0 comments on commit 1662a94

Please sign in to comment.