Andrew Dunham 943f930bd8 util/topk: prevent duplicate elements
Previously, we would insert duplicate elements into the TopK
datastructure while it wasn't fully populated, which resulted in
incorrect data due to a single "top" entry being split among multiple
elements.

Updates tailscale/corp#25479

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: Ibf118bd41534dc53e0ce9be68cfcbda267b4de77
2025-01-10 17:45:31 -05:00
..
2025-01-10 17:45:31 -05:00