cpu

package
v0.0.0-...-eace2b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoreNum

func CoreNum() int

CoreNum 返回当前环境的 CPU 数

func EnsureCPUUsage

func EnsureCPUUsage(percentage int, statisticInterval time.Duration) error

EnsureCPUUsage 确保 CPU 使用率不低于指定的百分比 (0 <= percentage < 100)。目前只支持 Linux 系统。一旦启动就无法停止, 除非进程退出

func SetDebugger

func SetDebugger(f func(string, ...any))

SetDebugger 设置调试器, 用于输出调试信息

func SetPIDParameters

func SetPIDParameters(kp, ki, kd float64)

SetPIDParameters 设置 PID 参数

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL