Code inspection (#581)

* Code inspection

* fix [4]int64 conversiong
This commit is contained in:
David Colburn
2022-03-30 13:49:53 -07:00
committed by GitHub
parent 26f7bb498a
commit 0b8a180554
77 changed files with 228 additions and 151 deletions
+3 -2
View File
@@ -4,8 +4,9 @@ import (
"sync"
"time"
"github.com/livekit/protocol/livekit"
"google.golang.org/protobuf/types/known/timestamppb"
"github.com/livekit/protocol/livekit"
)
type DataStatsParam struct {
@@ -83,6 +84,6 @@ func (s *DataStats) ToProtoAggregateOnly() *livekit.RTPStats {
EndTime: timestamppb.New(end),
Duration: end.Sub(s.startTime).Seconds(),
Bytes: uint64(s.windowBytes),
Bitrate: float64(s.windowBytes) * 8 / float64(end.Sub(s.startTime).Seconds()),
Bitrate: float64(s.windowBytes) * 8 / end.Sub(s.startTime).Seconds(),
}
}