mirror of
https://github.com/nonoo/kappanhang.git
synced 2025-12-06 08:02:00 +01:00
Remove server audio time logging
This commit is contained in:
parent
bbcde03608
commit
34f690484b
|
|
@ -83,7 +83,6 @@ func (s *audioStream) handleRxSeqBufEntry(e seqBufEntry) {
|
|||
} else {
|
||||
s.serverAudioTime = time.Now()
|
||||
}
|
||||
statusLog.reportServerAudioTime(s.serverAudioTime)
|
||||
s.lastReceivedSeq = gotSeq
|
||||
s.receivedAudio = true
|
||||
|
||||
|
|
|
|||
18
statuslog.go
18
statuslog.go
|
|
@ -14,9 +14,8 @@ type statusLogStruct struct {
|
|||
|
||||
line string
|
||||
|
||||
startTime time.Time
|
||||
rttLatency time.Duration
|
||||
audioTimeDiff time.Duration
|
||||
startTime time.Time
|
||||
rttLatency time.Duration
|
||||
}
|
||||
|
||||
var statusLog statusLogStruct
|
||||
|
|
@ -28,13 +27,6 @@ func (s *statusLogStruct) reportRTTLatency(l time.Duration) {
|
|||
s.rttLatency = l
|
||||
}
|
||||
|
||||
func (s *statusLogStruct) reportServerAudioTime(t time.Time) {
|
||||
s.mutex.Lock()
|
||||
defer s.mutex.Unlock()
|
||||
|
||||
s.audioTimeDiff = time.Since(t)
|
||||
}
|
||||
|
||||
func (s *statusLogStruct) print() {
|
||||
s.mutex.Lock()
|
||||
defer s.mutex.Unlock()
|
||||
|
|
@ -52,15 +44,11 @@ func (s *statusLogStruct) update() {
|
|||
defer s.mutex.Unlock()
|
||||
|
||||
up, down, lost, retransmits := netstat.get()
|
||||
var debugStr string
|
||||
if verboseLog {
|
||||
debugStr = fmt.Sprint(" adiff ", s.audioTimeDiff.Milliseconds(), "ms")
|
||||
}
|
||||
|
||||
s.line = fmt.Sprint("up ", time.Since(s.startTime).Round(time.Second),
|
||||
" rtt ", s.rttLatency.Milliseconds(), "ms up ",
|
||||
netstat.formatByteCount(up), "/s down ",
|
||||
netstat.formatByteCount(down), "/s retx ", retransmits, " /1m lost ", lost, " /1m", debugStr)
|
||||
netstat.formatByteCount(down), "/s retx ", retransmits, " /1m lost ", lost, " /1m")
|
||||
|
||||
if s.isRealtimeInternal() {
|
||||
s.line = fmt.Sprint(time.Now().Format("2006-01-02T15:04:05.000Z0700"), " ", s.line, "\r")
|
||||
|
|
|
|||
Loading…
Reference in a new issue