Constructor initializes the ByteRate object with a specified interval (default: 1000ms). It sets up necessary variables to track byte rate over time.
Time interval in milliseconds to compute the byte rate.
Returns the interval used for computing the byte rate
Sets a new interval for computing the average byte rate
Adds a new byte sample to the tracking system. Updates the list of samples and recomputes the byte rate
Number of bytes added in this interval
Clears all recorded byte rate data.
Clips the byte rate tracking by marking the last sample as clipped. If a previous clip exists, removes the clipped sample and all preceding samples. Allows to shrink the interval manually between two positions.
Computes the exact byte rate in bytes per second
Raised when new bytes are added
Returns the computed byte rate rounded to the nearest integer
Class to compute a weighted average byte rate over a specified time interval.
This class continuously tracks data transmission and computes the byte rate based on a weighted average, considering both the duration and the number of bytes in each sample. It allows for real-time monitoring of bandwidth usage and provides mechanisms to dynamically adjust the measurement interval.
Features: