rewrite metrics system to provide more data (#492)

This commit is contained in:
aler9
2021-08-12 11:48:47 +02:00
parent 6702cb41ed
commit f1a812ba5d
15 changed files with 393 additions and 176 deletions

View File

@@ -8,7 +8,6 @@ import (
"fmt"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/aler9/gortsplib"
@@ -75,7 +74,6 @@ func newRTSPSource(
ctxCancel: ctxCancel,
}
atomic.AddInt64(s.stats.CountSourcesRTSP, +1)
s.log(logger.Info, "started")
s.wg.Add(1)
@@ -85,7 +83,6 @@ func newRTSPSource(
}
func (s *rtspSource) Close() {
atomic.AddInt64(s.stats.CountSourcesRTSP, -1)
s.log(logger.Info, "stopped")
s.ctxCancel()
}