From 15b41f7fe25d82938b8ab88142e4a98e92c1a67a Mon Sep 17 00:00:00 2001 From: Joakim Hamren Date: Sun, 20 Sep 2020 21:14:29 +0200 Subject: [PATCH] readme update --- README.md | 18 +++++++++--------- config.go | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9ff210a..7033b2f 100644 --- a/README.md +++ b/README.md @@ -8,25 +8,25 @@ Sets up an HTTP API that provides the load test data in JSON. ``` Usage of ltt: -api-host string - REST API port to bind to. (Default all, empty string) + REST API port to bind to. -api-port int - REST API port to bind to. (Default 4141) (default 4141) + REST API port to bind to. (default 4141) -log-prefix string - Logging prefix (Default empty string) + Logging prefix -max-sleep-time int - Maximum sleep time between a user's tasks in seconds (Default 10) (default 10) + Maximum sleep time between a user's tasks in seconds (default 10) -min-sleep-time int - Minimum sleep time between a user's tasks in seconds (Default 1) (default 1) + Minimum sleep time between a user's tasks in seconds (default 1) -num-spawn-per-sec int - Number of user to spawn per second (Default 1) (default 1) + Number of user to spawn per second (default 1) -num-users int Number of users to spawn (default 5) -request-timeout int - Request timeout in seconds (Default 5) (default 5) + Request timeout in seconds (default 5) -spawn-on-startup - If true, spawning will begin on startup (Default false) + If true, spawning will begin on startup -verbose - Verbose logging (default false) + Verbose logging ``` ## User-Interfaces diff --git a/config.go b/config.go index e3c554e..1eb1a8d 100644 --- a/config.go +++ b/config.go @@ -36,15 +36,15 @@ func NewConfigFromFlags() Config { conf := Config{} flag.IntVar(&conf.NumUsers, "num-users", 5, "Number of users to spawn") - flag.IntVar(&conf.RequestTimeout, "request-timeout", 5, "Request timeout in seconds (Default 5)") - flag.IntVar(&conf.MinSleepTime, "min-sleep-time", 1, "Minimum sleep time between a user's tasks in seconds (Default 1)") - flag.IntVar(&conf.MaxSleepTime, "max-sleep-time", 10, "Maximum sleep time between a user's tasks in seconds (Default 10)") - flag.IntVar(&conf.NumSpawnPerSecond, "num-spawn-per-sec", 1, "Number of user to spawn per second (Default 1)") - flag.StringVar(&conf.APIHost, "api-host", "", "REST API port to bind to. (Default all, empty string)") - flag.StringVar(&conf.LogPrefix, "log-prefix", "", "Logging prefix (Default empty string)") - flag.IntVar(&conf.APIPort, "api-port", 4141, "REST API port to bind to. (Default 4141)") - flag.BoolVar(&conf.Verbose, "verbose", false, "Verbose logging (default false)") - flag.BoolVar(&conf.SpawnOnStartup, "spawn-on-startup", false, "If true, spawning will begin on startup (Default false)") + flag.IntVar(&conf.RequestTimeout, "request-timeout", 5, "Request timeout in seconds") + flag.IntVar(&conf.MinSleepTime, "min-sleep-time", 1, "Minimum sleep time between a user's tasks in seconds") + flag.IntVar(&conf.MaxSleepTime, "max-sleep-time", 10, "Maximum sleep time between a user's tasks in seconds") + flag.IntVar(&conf.NumSpawnPerSecond, "num-spawn-per-sec", 1, "Number of user to spawn per second") + flag.StringVar(&conf.APIHost, "api-host", "", "REST API port to bind to.") + flag.StringVar(&conf.LogPrefix, "log-prefix", "", "Logging prefix") + flag.IntVar(&conf.APIPort, "api-port", 4141, "REST API port to bind to.") + flag.BoolVar(&conf.Verbose, "verbose", false, "Verbose logging") + flag.BoolVar(&conf.SpawnOnStartup, "spawn-on-startup", false, "If true, spawning will begin on startup") flag.Parse() if conf.LogOutput == nil {