Packet stats from TC (#832)

* system level packet stats from tc

* drop percent

* test fix

* formatting

* formatting/wording

* prometheus metrics

* update livekit protocol go module
This commit is contained in:
Mathew Kamkar
2022-07-15 10:41:40 -07:00
committed by GitHub
parent 4c7d3161a9
commit e0676132d4
6 changed files with 497 additions and 78 deletions
+9 -2
View File
@@ -9,8 +9,10 @@ import (
"github.com/mackerelio/go-osstat/cpu"
)
var cpuStatsLock sync.RWMutex
var lastCPUTotal, lastCPUIdle uint64
var (
cpuStatsLock sync.RWMutex
lastCPUTotal, lastCPUIdle uint64
)
func getCPUStats() (cpuLoad float32, numCPUs uint32, err error) {
cpuInfo, err := cpu.Get()
@@ -31,3 +33,8 @@ func getCPUStats() (cpuLoad float32, numCPUs uint32, err error) {
return
}
func getTCStats() (packets, drops uint32, err error) {
// linux only
return
}