Currently we service only for HTTP Post request! Later we will add Get/Put Methods
userId
to a random string. Also set the value of userAge
to a random int.-s
option, we can check all benchmark logs(http://localhost:8022)Option | Detail |
---|---|
-c | The number of concurrent thread |
-h | See all options |
-j | Generate fuzzed json object If you set the key/type of the json object with the corresponding option, a json object with a random value is created. Four types of fuzzing are supported as follows. int, float, string, boolean Usage Example ex) -j "[userId,string,userAge,int]" |
-r | The number of HTTP Post request |
-t | The timeout of the network connection of the benchmark client |
-u | Request URL |
-s | Access log server |
-i | Add additional information |
go get github.com/fatih/color
for coloring your terminalgo get -v github.com/gosuri/uilive
for updating processgo get -u github.com/go-echarts/go-echarts/v2/...
to see graph with responses in timeseries.go get github.com/ompluscator/dynamic-struct
to dynamically add field of json structs.run go run main.go
in your terminal and see options
Alloc = 0 MiB TotalAlloc = 0 MiB Sys = 8 MiB NumGC = 0
Properties
- Max parallelism : 8
Usage of /var/folders/h0/_d_zrr0j57x8wmknjb1r6hfm0000gn/T/go-build3252492082/b001/exe/main:
-c int
스레드 개수 (default 100)
-j string
Json "[KEY1,TYPE1,KEY2,TYPE2,...]"
-r int
요청 개수 (default 10000)
-t int
요청 타임아웃(second) (default 30)
-u string
URL
$ go run main.go -j "[userId,string,userPw,string,mail,string,userName,string]" -r 10000 -c 1000 -u http://127.0.0.1:8080/auth/user
[Properties]
- Max parallelism : 8
- Request url : http://127.0.0.1:8080/auth/user
- The number of HTTP Requests : 10000
- The number of threads : 100
Listening server's response .. (10000/10000)
[Results]
---------------------------------------------------------
| Response Status | Count | Percent |
| 200 | 10000/10000 | 100.0% |
---------------------------------------------------------
- Average response time : 110.66 ms
- Max response time : 770.32 ms
- Min response time : 21.46 ms
[Memory Usage]
- Heap size = 2 MB
- Cumulative Heap size = 161 MB
- All goroutine size = 22 MB
- GC cycle 횟수 = 48
Finished! ( Total Elapsed Time : 11.4659 seconds )
Now you can see response time series graph in local machine => http://localhost:8022