The status page reports zero packets a minute on a feed that is receiving packets #58
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 agonext toPackets/Sec: 0andPackets/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:236renders{@aprs_status.packet_stats.packets_per_second * 60}as Packets/Min.lib/aprsme/is/is.ex:708fillspackets_per_secondfromPacketStats.per_second(stats, System.system_time(:second)).lib/aprsme/is/packet_stats.ex:58returnsstats.last_second_countonly 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
Effort: S
Lens: ops