Update auto-check config and stress modules

This commit is contained in:
12600k-rog-d4
2026-08-20 08:09:01 +08:00
parent 2aaaa16ae2
commit 22f6c40705
7 changed files with 164 additions and 169 deletions

View File

@@ -46,6 +46,10 @@ type StressConfig struct {
Types string `yaml:"types"`
Duration time.Duration `yaml:"duration"`
Threads int `yaml:"threads"`
MemSizeMB int `yaml:"mem_size_mb"` // 内存压测占用(MB)0=自动(可用60%)
DiskSizeMB int `yaml:"disk_size_mb"` // 磁盘压测文件大小(MB)0=默认1024
DiskDir string `yaml:"disk_dir"` // 磁盘压测目录,空=自动临时目录
TempInterval time.Duration `yaml:"temp_interval"` // 温度采样间隔0=默认10s
TempLimit float64 `yaml:"temp_limit"` // 温度上限(°C)0=不判定
AutoInstall bool `yaml:"auto_install"` // 缺工具时尝试在线安装apt/dnf/yum 等)
UseMirror bool `yaml:"use_mirror"` // 在线安装时切换国内镜像源(清华 TUNA国内网络卡顿/超时再开启
@@ -87,12 +91,14 @@ func Default() *Config {
Port: 22,
},
Stress: StressConfig{
Types: "cpu,memory",
Duration: 30 * time.Second,
Threads: 4,
TempLimit: 90,
AutoInstall: true,
UseMirror: false,
Types: "cpu,memory",
Duration: 30 * time.Second,
Threads: 4,
DiskSizeMB: 1024,
TempInterval: 10 * time.Second,
TempLimit: 90,
AutoInstall: true,
UseMirror: false,
},
Workflow: WorkflowConfig{
Interval: 10 * time.Second,