The status page reports zero packets a minute on a feed that is receiving packets #58

Open
opened 2026-11-03 18:52:30 +00:00 by skippy-bot · 0 comments

Problem

Packets/Min is computed as the last completed second's count times 60. A feed taking 20 packets a minute usually has no packet in any given second, so the panel shows Total Packets climbing and Last Packet: 4 seconds ago next to Packets/Sec: 0 and Packets/Min: 0. An operator checking whether the feed is healthy reads a rate of zero.

Evidence

At 2f150f66:

  • lib/aprsme_web/live/status_live/index.ex:236 renders {@aprs_status.packet_stats.packets_per_second * 60} as Packets/Min.
  • lib/aprsme/is/is.ex:708 fills packets_per_second from PacketStats.per_second(stats, System.system_time(:second)).
  • lib/aprsme/is/packet_stats.ex:58 returns stats.last_second_count only when the previous second is exactly one tick old, otherwise zero.

Expected

Packets/Min is measured over a minute, or the panel omits a rate it cannot derive from one second. Two adjacent numbers on the same panel must not contradict each other.

How to verify

Aprsme.Is.PacketStats.per_second(%Aprsme.Is.PacketStats{} |> Aprsme.Is.PacketStats.record(1000, 20), 1003) returns 0, so 20 packets just received render as 0 per minute.

Acceptance criteria

  • The rate shown covers the window its label names.
  • A quiet second does not zero a per-minute figure.
  • A test covers a low rate feed.

Effort: S
Lens: ops

## Problem Packets/Min is computed as the last completed second's count times 60. A feed taking 20 packets a minute usually has no packet in any given second, so the panel shows Total Packets climbing and `Last Packet: 4 seconds ago` next to `Packets/Sec: 0` and `Packets/Min: 0`. An operator checking whether the feed is healthy reads a rate of zero. ## Evidence At `2f150f66`: - `lib/aprsme_web/live/status_live/index.ex:236` renders `{@aprs_status.packet_stats.packets_per_second * 60}` as Packets/Min. - `lib/aprsme/is/is.ex:708` fills `packets_per_second` from `PacketStats.per_second(stats, System.system_time(:second))`. - `lib/aprsme/is/packet_stats.ex:58` returns `stats.last_second_count` only when the previous second is exactly one tick old, otherwise zero. ## Expected Packets/Min is measured over a minute, or the panel omits a rate it cannot derive from one second. Two adjacent numbers on the same panel must not contradict each other. ## How to verify `Aprsme.Is.PacketStats.per_second(%Aprsme.Is.PacketStats{} |> Aprsme.Is.PacketStats.record(1000, 20), 1003)` returns 0, so 20 packets just received render as 0 per minute. ## Acceptance criteria - [ ] The rate shown covers the window its label names. - [ ] A quiet second does not zero a per-minute figure. - [ ] A test covers a low rate feed. **Effort:** S **Lens:** ops
Sign in to join this conversation.
No description provided.