0813
This commit is contained in:
@@ -38,13 +38,17 @@ type SSHConfig struct {
|
||||
Password string `yaml:"password"`
|
||||
KeyFile string `yaml:"key"`
|
||||
Port int `yaml:"port"`
|
||||
SudoPwd string `yaml:"sudo_password"` // 非 root 用户安装工具时使用的 sudo 密码
|
||||
}
|
||||
|
||||
// StressConfig 压力测试
|
||||
type StressConfig struct {
|
||||
Types string `yaml:"types"`
|
||||
Duration time.Duration `yaml:"duration"`
|
||||
Threads int `yaml:"threads"`
|
||||
Types string `yaml:"types"`
|
||||
Duration time.Duration `yaml:"duration"`
|
||||
Threads int `yaml:"threads"`
|
||||
TempLimit float64 `yaml:"temp_limit"` // 温度上限(°C),0=不判定
|
||||
AutoInstall bool `yaml:"auto_install"` // 缺工具时尝试在线安装(apt/dnf/yum 等)
|
||||
UseMirror bool `yaml:"use_mirror"` // 在线安装时切换国内镜像源(清华 TUNA),国内网络卡顿/超时再开启
|
||||
}
|
||||
|
||||
// ReportConfig 报告
|
||||
@@ -83,9 +87,12 @@ func Default() *Config {
|
||||
Port: 22,
|
||||
},
|
||||
Stress: StressConfig{
|
||||
Types: "cpu,memory",
|
||||
Duration: 30 * time.Second,
|
||||
Threads: 4,
|
||||
Types: "cpu,memory",
|
||||
Duration: 30 * time.Second,
|
||||
Threads: 4,
|
||||
TempLimit: 90,
|
||||
AutoInstall: true,
|
||||
UseMirror: false,
|
||||
},
|
||||
Workflow: WorkflowConfig{
|
||||
Interval: 10 * time.Second,
|
||||
|
||||
Reference in New Issue
Block a user