signal-bot/signal_bot/analytics
Krzysztof kuhy Rudnicki 4af32f8bd5 Handle frames side by side, and budget the bot's own share of a reply
Bot.listen awaited every frame to completion, so one Commons fetch or one
attachment upload held up every text reply behind it (DOCS-latency.md).
Each frame now runs in its own task, never more than LIMIT at once; the
reader waits for a slot before spawning, so a burst applies back-pressure
at the websocket instead of fanning out upstream. One person's commands
stay serialised (user_lock.py): two quick !kot would otherwise both pass
the cooldown gate before either recorded a use.

Every served command reports its timings split into the bot's own time
and everybody else's (served.py); /_selftest carries that block and
tool/latency.py holds own_ms to 100 ms at p95, with the command's
cooldown switched off for the run and put back afterwards.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-04 21:35:34 +02:00
..
__init__.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
adoption.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
backfill_join.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
backfill.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
content.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
demand.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
health.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
hours.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
journal.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
probe.py Handle frames side by side, and budget the bot's own share of a reply 2026-09-04 21:35:34 +02:00
recorder.py A switchboard: any command off, off until, or on its own cooldown 2026-09-04 15:55:56 +02:00
render.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
scope.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
sessions.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
trend.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
usage.py release: 0.2.6 «Stephanus I» — dodano !analityka 2026-08-31 23:19:51 +02:00
uses.py A switchboard: any command off, off until, or on its own cooldown 2026-09-04 15:55:56 +02:00