Use a worker to report signal/data stats. (#2260)

* Use a worker to report signal/data stats.

Was checking if reporting is needed on every update.
The check is wasted work if volume of signal/data messages is high
as reporting happens only once in 10 seconds.

Changing to a worker based on a timer. And also aligning with
telemetry reporting interval which defaults to 30 seconds.

* Remove unused constant
This commit is contained in:
Raja Subramanian
2023-11-22 11:47:15 +05:30
committed by GitHub
parent f18d6356e8
commit 56dd399684
4 changed files with 28 additions and 32 deletions
+1 -1
View File
@@ -269,7 +269,7 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
close(done)
if signalStats != nil {
signalStats.Report()
signalStats.Stop()
}
}()