From 312dd0ff928fb013aae76b5fd83e32df2aaff92d Mon Sep 17 00:00:00 2001 From: udhos Date: Sun, 28 Feb 2021 00:51:54 -0300 Subject: [PATCH] Update sample help. --- README.md | 22 ++++++++++++++++++---- goben/main.go | 3 ++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c46de4f..2751a60 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,12 @@ Find several supported command-line switches by running 'goben -h': ``` $ goben -h +2021/02/28 00:43:28 goben version 0.6 runtime go1.16 GOMAXPROCS=12 OS=linux arch=amd64 Usage of goben: -ascii plot ascii chart (default true) + -cert string + TLS cert file (default "cert.pem") -chart string output filename for rendering chart on client '%d' is parallel connection index to host @@ -99,27 +102,38 @@ Usage of goben: -hosts value comma-separated list of hosts you may append an optional port to every host: host[:port] + -key string + TLS key file (default "key.pem") -listeners value comma-separated list of listen addresses you may prepend an optional host to every port: [host]:port + -localAddr string + bind specific local address:port + example: -localAddr 127.0.0.1:2000 -maxSpeed float bandwidth limit in mbps (0 means unlimited) -passiveClient suppress client writes -passiveServer suppress server writes - -readSize int - read buffer size in bytes (default 50000) -reportInterval string periodic report interval unspecified time unit defaults to second (default "2s") + -tcpReadSize int + TCP read buffer size in bytes (default 1000000) + -tcpWriteSize int + TCP write buffer size in bytes (default 1000000) + -tls + set to false to disable TLS (default true) -totalDuration string test total duration unspecified time unit defaults to second (default "10s") -udp run client in UDP mode - -writeSize int - write buffer size in bytes (default 50000) + -udpReadSize int + UDP read buffer size in bytes (default 64000) + -udpWriteSize int + UDP write buffer size in bytes (default 64000) ``` # Example diff --git a/goben/main.go b/goben/main.go index c4b4567..859c434 100644 --- a/goben/main.go +++ b/goben/main.go @@ -60,6 +60,8 @@ func badExportFilename(parameter, filename string) error { func main() { + log.Printf("goben version " + version + " runtime " + runtime.Version() + " GOMAXPROCS=" + strconv.Itoa(runtime.GOMAXPROCS(0)) + " OS=" + runtime.GOOS + " arch=" + runtime.GOARCH) + app := config{} flag.Var(&app.hosts, "hosts", "comma-separated list of hosts\nyou may append an optional port to every host: host[:port]") @@ -118,7 +120,6 @@ func main() { app.listeners = []string{app.defaultPort} } - log.Printf("goben version " + version + " runtime " + runtime.Version() + " GOMAXPROCS=" + strconv.Itoa(runtime.GOMAXPROCS(0)) + " OS=" + runtime.GOOS + " arch=" + runtime.GOARCH) log.Printf("connections=%d defaultPort=%s listeners=%q hosts=%q", app.connections, app.defaultPort, app.listeners, app.hosts) log.Printf("reportInterval=%s totalDuration=%s", app.opt.ReportInterval, app.opt.TotalDuration)