File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -4,23 +4,23 @@ import {
44 NetworkScores ,
55 INetworkScoresCalculator ,
66 WebRTCStatsParsed ,
7- NetworkQualityStats ,
7+ NetworkQualityStatsSample ,
88} from './types' ;
99import { scheduleTask } from './utils/tasks' ;
1010import { CLEANUP_PREV_STATS_TTL_MS } from './utils/constants' ;
1111
1212type MosCalculatorResult = {
1313 mos : NetworkScore ,
14- stats : NetworkQualityStats ,
14+ stats : NetworkQualityStatsSample ,
1515} ;
1616
1717class NetworkScoresCalculator implements INetworkScoresCalculator {
1818 #lastProcessedStats: { [ connectionId : string ] : WebRTCStatsParsed } = { } ;
1919
2020 calculate ( data : WebRTCStatsParsed ) : NetworkScores {
2121 const { connection : { id : connectionId } } = data ;
22- const { mos : outbound , stats : outboundStats } = this . calculateOutboundScore ( data ) || { } ;
23- const { mos : inbound , stats : inboundStats } = this . calculateInboundScore ( data ) || { } ;
22+ const { mos : outbound , stats : outboundStatsSample } = this . calculateOutboundScore ( data ) || { } ;
23+ const { mos : inbound , stats : inboundStatsSample } = this . calculateInboundScore ( data ) || { } ;
2424 this . #lastProcessedStats[ connectionId ] = data ;
2525
2626 scheduleTask ( {
@@ -32,9 +32,9 @@ class NetworkScoresCalculator implements INetworkScoresCalculator {
3232 return {
3333 outbound,
3434 inbound,
35- debug : {
36- inboundStats ,
37- outboundStats ,
35+ statsSamples : {
36+ inboundStatsSample ,
37+ outboundStatsSample ,
3838 } ,
3939 } ;
4040 }
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export type DetectIssuesPayload = {
9999
100100export type NetworkScore = number ;
101101
102- export type NetworkQualityStats = {
102+ export type NetworkQualityStatsSample = {
103103 avgJitter : number ;
104104 rtt : number ;
105105 packetsLoss : number ;
@@ -108,9 +108,9 @@ export type NetworkQualityStats = {
108108export type NetworkScores = {
109109 outbound ?: NetworkScore ,
110110 inbound ?: NetworkScore ,
111- debug : {
112- outboundStats ?: NetworkQualityStats ,
113- inboundStats ?: NetworkQualityStats ,
111+ statsSamples : {
112+ outboundStatsSample ?: NetworkQualityStatsSample ,
113+ inboundStatsSample ?: NetworkQualityStatsSample ,
114114 } ,
115115} ;
116116
You can’t perform that action at this time.
0 commit comments