reduce lock contention and fix a potential race
1. Handle `registered` inside the main loop. This way we can avoid atomics. 2. Don't start calculating bandwidth for newly active meters until they've been active for a round. This: 1. Ensures we only write to the snapshot from within the main loop. 2. Gives us a better estimated bandwidth usage.
Showing
Please register or sign in to comment