Skip to content

Commit

Permalink
Changed README and rules for it
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD committed Feb 11, 2017
1 parent 11fc1bd commit ee960f5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ time = 30
[[app]]
title = "Application Banchamrs Title"
path = "fool/path/to/app"
url = "http://localhost:5000/test"
````

## How to use
Expand All @@ -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)
2 changes: 2 additions & 0 deletions apps/nickel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
/home/evgeny/rs/nickel/target/release/nickel
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
)
Expand Down

0 comments on commit ee960f5

Please sign in to comment.