- Notifications
You must be signed in to change notification settings - Fork0
ghkdqhrbals/gotybench
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- GotyBench was designed fortesting 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 MiBTotalAlloc = 0 MiBSys = 8 MiBNumGC = 0Properties- Max parallelism: 8Usage of /var/folders/h0/_d_zrr0j57x8wmknjb1r6hfm0000gn/T/go-build3252492082/b001/exe/main:-c int스레드 개수 (default 100)-j stringJson"[KEY1,TYPE1,KEY2,TYPE2,...]" -r int요청 개수 (default 10000)-t int요청 타임아웃(second) (default 30)-u stringURL
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: 100Listening 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 횟수 = 48Finished! ( Total Elapsed Time : 11.4659 seconds )Now you can see response time series graph in local machine => http://localhost:8022
About
HTTP Benchmark Tool written in Golang. gotybench can generate randomized json objects which have key/type that produced by user.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.