Skip to content

🔥 Release V 1.0.0. An experimental Concurrent Command Line Performance Testing tool

License

Notifications You must be signed in to change notification settings

Bhinneka/gubrak

Repository files navigation

Gubrak

an experimental Command Line performance testing tool for your services. What this means, this tool will run concurrently againts your service.

Gubrak Gopher

TODO

  • Better code
  • Writing test
  • Better output

Usage

  • Install from Homebrew
$ brew install Bhinneka/tool/gubrak
  • Update from Homebrew
$ brew upgrade Bhinneka/tool/gubrak
  • Install binary from source
$ go get github.com/Bhinneka/gubrak

$ go install github.com/Bhinneka/gubrak/cmd/gubrak

$ gubrak --version

Send JSON payload

create config.json file with signature like this for "Content-Type" : application/json:

{
    "url": "http://example.com",
    "headers": {
        "Authorization": "Basic exnfekeoeoeojsjalaljahhd",
        "Content-Type": "application/json",
        "Accept": "application/json"
    },
	"payload": {
		"from": "Bob",
		"content": {
			"header": "This is Message 3",
			"body": "Hello There"
		}
	}
}

Send form-urlencoded payload

create config.json file with signature like this for "Content-Type": "application/x-www-form-urlencoded":

{
    "url": "http://example.com",
    "headers": {
        "Authorization": "Basic exnfekeoeoeojsjalaljahhd",
        "Content-Type": "application/json",
        "Accept": "application/json"
    },
	"payload": "from=Bob&content=hello"
}
  • run gubrak
$ gubrak -m get -c /Users/wurianto/Documents/config.json -u https://jsonplaceholder.typicode.com/posts -r 100

Send 100 Concurrent HTTP Request

List flag and arguments

  • -m | --method (default GET) HTTP method, example -m POST or -m post
  • -r (default 10) Size of Concurrent request, example -r 1000
  • -c | --config config.json (default config.json) location, example -c /Users/wurianto/Documents/config.json
  • -u | --url URL full with path (default in config.json), example -u https://jsonplaceholder.typicode.com/posts
  • -v | --version show gubrak version, example gubrak -v
  • -h | --help show Help, example ./gubrak -h