-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
statistic counters are not monotonically increasing #119
Comments
You're in line with my earlier idea of what to expect, but I'm currently counting by the second. And I've actually been torn on whether or not to keep stacking on stats. |
Stacking on stats is still a good idea. However, the reset every second causes accounting issues due to poll interval misalignment. For example, if the client polls the stats every 3 seconds, the client will miss ~2 datapoints (t+0 and t+1 stats got reset). This shouldn't be an issue for big numbers in JSON API. Clients must follow the JSON specification, which treats numbers as a variable length of digits, aka big int. https://www.json.org/json-en.html This is on my Firefox console.
For u64, assuming a 4k video is being streamed (~50Mbps) and we're only concerned with 1 stream as these stats belong to individual sockets, |
ok, very good tip. |
update by: 2e03745 |
Describe the bug
I expect that as a
SocketAddr
is uniquely registered (on session allocated) to the statistics table, its metrics will continue to increase monotonically until the sameSocketAddr
is unregistered (on session closed).To Reproduce
Steps to reproduce the behavior:
SocketAddr
Additional context
Removing these lines fixes the issue:
turn-rs/turn-server/src/statistics.rs
Lines 256 to 262 in 6ebc23b
What is the expected behavior from these statistics? Also, what's the purpose of the code above?
The text was updated successfully, but these errors were encountered: