###Installation Counter requires Go 1.5 or later.
$ go get -u github.com/phedoreanu/counter
###Usage
$ docker-compose up
###Unit tests
$ go test -v -race -cover -parallel 8 -cpu 8
###Smoke tests
$ ansible-playbook smoke-tests.yml
###Load tests Start the app and execute:
$ HOSTNAME=localhost:8080 ./load-tests.sh
Open plot.html
for a nice graph.
###Cyclomatic complexity
$ mccabe-cyclomatic -p github.com/phedoreanu/counter
4
$ gocyclo -top 3 -avg .
4 main (*Env).SyncCounter main.go:39:1
3 db (*DB).IncrementCounter db/db.go:64:1
3 db (*DB).ReadCounter db/db.go:48:1
Average: 2