mirror of
https://github.com/livekit/livekit.git
synced 2026-09-16 12:52:40 +00:00
getCPUStats has no callers: node CPU load comes from hwstats.CPUStats in GetNodeStats, and nothing in the tree reads getCPUStats. Only getLoadAvg is still used. Remove the function from both the windows and non-windows variants along with the state it kept. getLoadAvg is untouched, and go-osstat stays a direct dependency through it. Co-authored-by: XiaoShao <26596822+xiaoshao9704@users.noreply.github.com>
26 lines
756 B
Go
26 lines
756 B
Go
//go:build !windows
|
|
|
|
/*
|
|
* Copyright 2023 LiveKit, Inc
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package prometheus
|
|
|
|
import "github.com/mackerelio/go-osstat/loadavg"
|
|
|
|
func getLoadAvg() (*loadavg.Stats, error) {
|
|
return loadavg.Get()
|
|
}
|