Skip to content

feat: log per-minute sync notification stats#14

Merged
d4rken merged 1 commit into
mainfrom
feat/sync-notification-stats
Apr 29, 2026
Merged

feat: log per-minute sync notification stats#14
d4rken merged 1 commit into
mainfrom
feat/sync-notification-stats

Conversation

@d4rken

@d4rken d4rken commented Apr 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds SyncNotificationStats to track WebSocket sync notification outcomes (batches, events, deliveries, skipped self-peers, no-peers, closed sessions, buffer-full drops, failures, per-module counts).
  • SyncNotifier launches a periodic job (1 min, IO dispatcher) via the existing launchPeriodicJob helper that snapshots+resets the stats and emits one INFO line per non-empty window.
  • Lowers the per-broadcast "Sending [...] to account=..." log from INFO to DEBUG since the aggregate now covers it.

Test plan

  • ./gradlew test --tests "eu.darken.octi.server.ws.SyncNotificationStatsTest"
  • ./gradlew test --tests "eu.darken.octi.server.ws.SyncNotifierTest" — confirm existing tests still pass
  • ./gradlew check
  • Manual: run server locally, write to a module, wait ~1 min, confirm a sync-stats: 1m batches=... modules=[...] line at INFO

Reports broadcast batches, events, deliveries, peer skips, and per-module counts at INFO once per minute. Mirrors the existing DeviceActivityReporter pattern.

Also lowers the per-broadcast 'Sending [...] to account=...' log from INFO to DEBUG since the aggregate now covers it.
@d4rken d4rken added the enhancement New feature or request label Apr 29, 2026
@d4rken d4rken merged commit 63b2bf5 into main Apr 29, 2026
5 checks passed
@d4rken d4rken deleted the feat/sync-notification-stats branch April 29, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant