From 2f7bb14d1d4b1e11129109d3ec2386d004ffb8af Mon Sep 17 00:00:00 2001 From: Mission Liao Date: Wed, 22 Aug 2018 14:00:04 +0800 Subject: simulation: allow to run simulation with scheduler on k8s (#72) To run a simulation with scheduler on k8s: ./run_scheduler.sh 61 5 Where *61* means the simulation contains 61 validators, and *5* means the simulation utilizes 5 vCPUs and corresponding concurrent workers to run. --- cmd/dexcon-simulation-with-scheduler/main.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'cmd') diff --git a/cmd/dexcon-simulation-with-scheduler/main.go b/cmd/dexcon-simulation-with-scheduler/main.go index 3ed71c3..b9f5ec3 100644 --- a/cmd/dexcon-simulation-with-scheduler/main.go +++ b/cmd/dexcon-simulation-with-scheduler/main.go @@ -16,10 +16,9 @@ import ( ) var ( - configFile = flag.String("config", "", "path to simulation config file") - cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`") - memprofile = flag.String("memprofile", "", "write memory profile to `file`") - workerCount = flag.Int("workercount", 1, "count of concurrent workers") + configFile = flag.String("config", "", "path to simulation config file") + cpuprofile = flag.String("cpuprofile", "", "write cpu profile to `file`") + memprofile = flag.String("memprofile", "", "write memory profile to `file`") ) func main() { @@ -72,7 +71,7 @@ func main() { } } // Run the simulation. - sch.Run(*workerCount) + sch.Run(cfg.Scheduler.WorkerNum) if err = integration.VerifyApps(apps); err != nil { log.Fatal("consensus result is not incorrect: ", err) } -- cgit v1.2.3