diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-03 23:28:57 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-03 23:28:57 +0300 |
| commit | 2f09915d3da7a23574e1a90fa70eb1af1cdf830a (patch) | |
| tree | 3c46947fd67ac0e20aff84ae2420a4788a8a8c0e /cmd | |
initial stuff
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/anelephantinachinashop/main.go | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/cmd/anelephantinachinashop/main.go b/cmd/anelephantinachinashop/main.go new file mode 100644 index 0000000..398b595 --- /dev/null +++ b/cmd/anelephantinachinashop/main.go @@ -0,0 +1,41 @@ +package main + +import ( + "flag" + "fmt" + "log" + + "codeberg.org/snonux/anelephantinachinashop/internal" + "codeberg.org/snonux/anelephantinachinashop/internal/config" +) + +func main() { + var conf config.Config + printVersion := flag.Bool("version", false, "Print version") + stressCPU := flag.Bool("cpu", false, "Stress CPU") + stressMemory := flag.Bool("memory", false, "Stress memory") + stressNetwork := flag.Bool("network", false, "Stress network") + flag.Parse() + + if *printVersion { + fmt.Println(internal.Version) + return + } + + if *stressCPU { + conf.CPU = config.CPUStressConfig{} + } + if *stressMemory { + conf.Memory = config.MemoryStressConfig{} + log.Fatal("Mode not yet implemented") + } + // TODO: Also add parallel stressers + if *stressNetwork { + conf.Network = config.NetworkStressConfig{} + log.Fatal("Mode not yet implemented") + } + + if err := internal.Run(conf); err != nil { + log.Fatal(err) + } +} |
