- GotyBench was designed for testing server load with multiple current threads
Currently we service only for HTTP Post request! Later we will add Get/Put Methods
- Testing with multiple concurrency : Developed with goroutine lightweight multi-threaded, set to communicate through channels.
- Automatically generate fuzzed json object : It is designed to automatically create a random json object when the user sets only the key and value type.
- ex) "gotybench -j [userId,string,userAge,int]" : Set the value of
userId
to a random string. Also set the value ofuserAge
to a random int.
- ex) "gotybench -j [userId,string,userAge,int]" : Set the value of
- Log server : By
-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 |
- run
go get github.com/fatih/color
for coloring your terminal - run
go get -v github.com/gosuri/uilive
for updating process - run
go get -u github.com/go-echarts/go-echarts/v2/...
to see graph with responses in timeseries. - run
go get github.com/ompluscator/dynamic-struct
to dynamically add field of json structs.
-
run
go run main.go
in your terminal and see optionsAlloc = 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
-
choose your options and run
$ 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