diff --git a/README.md b/README.md index 574c7cc..80d8f35 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ time = 30 [[app]] title = "Application Banchamrs Title" path = "fool/path/to/app" +url = "http://localhost:5000/test" ```` ## How to use @@ -69,8 +70,44 @@ path = "fool/path/to/app" `$ whereis wrk` `$ whereis siege` -* Configure `config/main.toml` as mentioned before. -* Build application: `$ make build` -* Run application: `$ make run` or after build `$ ./go-benchmark-app` +* Configure `config/main.toml` in current dirrectory as mentioned before. +* Install application: `$ go install github.com/mrlsd/go-benchmark-app` +* Command-line help: `$ go-benchmark-app -h` +``` +Go Benchmark Applications v1.0.0 +Options: + -c FILE + load configuration from FILE (default "config/main.toml") + -v verbose output +``` +* To change config file - run: `$ go-benchmark-app -c path/to/cfg.toml` +* Verbose output: `$ go-benchmark-app -v` + +## Tips & Tricks +* When your benchmarks test failed with socket error +(more resources unawailable), try increase `delay` options + at config file (for example 60 sec) or/and change system + limits to opened files, TCP/IP configuration and other + system limitations. +* For flexibility running test applications you can create +recipe for that. For example set at config file: +``` +[[app]] +title = "My App" +path = "apps/myapp.sh" +url = "http://localhost:5000/test" +``` + +and `apps/myapp.sh` file: +``` +#!/bin/sh +prepare -to -run +/full/path/to/app -v param -d param -etc +``` +in that way you can run `docker`, `nginx` or another +useful commands. + +For one application we use one `URL`, because it's simplify +results analyze, interpretation, comparison. #### License: MIT [![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/mrLSD/go-benchmark-app/master/LICENSE) diff --git a/apps/nickel.sh b/apps/nickel.sh new file mode 100755 index 0000000..e7b92d2 --- /dev/null +++ b/apps/nickel.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/home/evgeny/rs/nickel/target/release/nickel \ No newline at end of file diff --git a/config/config.go b/config/config.go index f190e7a..3f6e2a3 100644 --- a/config/config.go +++ b/config/config.go @@ -10,7 +10,7 @@ var ( // ConfigFile - default config file ConfigFile = "config/main.toml" // AppVersion - current major app version - AppVersion = "0.1" + AppVersion = "1.0.0" // Cfg - global config state Cfg = &Config{} )