Выпуск WDTT Plus v11

This commit is contained in:
Ivan4537 committed 2026-07-07 22:55:52 +03:00
1 parent a842c6965e
commit b3aad32990
25 files changed
+1722 -146

No files matched your search

+6 -6
View File
@@ -9,9 +9,9 @@ import (
var globalActiveConnections atomic.Int32
type Stats struct {
ActiveConnections int32
TotalBytesUp int64
TotalBytesDown int64
ActiveConnections atomic.Int32
TotalBytesUp atomic.Int64
TotalBytesDown atomic.Int64
}
func NewStats() *Stats {
@@ -27,9 +27,9 @@ func (s *Stats) RunLoop(shutdown <-chan struct{}) {
case <-shutdown:
return
case <-ticker.C:
active := atomic.LoadInt32(&s.ActiveConnections)
up := atomic.LoadInt64(&s.TotalBytesUp)
down := atomic.LoadInt64(&s.TotalBytesDown)
active := s.ActiveConnections.Load()
up := s.TotalBytesUp.Load()
down := s.TotalBytesDown.Load()
upMB := float64(up) / (1024.0 * 1024.0)
downMB := float64(down) / (1024.0 * 1024.0)