Fix data stats bitrate calculate (#1432)
This commit is contained in:
@@ -82,7 +82,7 @@ func (s *DataStats) ToProtoAggregateOnly() *livekit.RTPStats {
|
|||||||
StartTime: timestamppb.New(s.startTime),
|
StartTime: timestamppb.New(s.startTime),
|
||||||
EndTime: timestamppb.New(end),
|
EndTime: timestamppb.New(end),
|
||||||
Duration: end.Sub(s.startTime).Seconds(),
|
Duration: end.Sub(s.startTime).Seconds(),
|
||||||
Bytes: uint64(s.windowBytes),
|
Bytes: uint64(s.totalBytes),
|
||||||
Bitrate: float64(s.windowBytes) * 8 / end.Sub(s.startTime).Seconds(),
|
Bitrate: float64(s.totalBytes) * 8 / end.Sub(s.startTime).Seconds(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user