Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

HTTP Benchmark Tool written in Golang. gotybench can generate randomized json objects which have key/type that produced by user.

NotificationsYou must be signed in to change notification settings

ghkdqhrbals/gotybench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Goal of GotyBench

  1. Testing with multiple concurrency : Developed with goroutine lightweight multi-threaded, set to communicate through channels.
  2. 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 ofuserId to a random string. Also set the value ofuserAge to a random int.
  3. Log server : By-s option, we can check all benchmark logs(http://localhost:8022)

Options

OptionDetail
-cThe number of concurrent thread
-hSee all options
-jGenerate 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]"
-rThe number of HTTP Post request
-tThe timeout of the network connection of the benchmark client
-uRequest URL
-sAccess log server
-iAdd additional information

Before we started, we need to get ...

  1. rungo get github.com/fatih/color for coloring your terminal
  2. rungo get -v github.com/gosuri/uilive for updating process
  3. rungo get -u github.com/go-echarts/go-echarts/v2/... to see graph with responses in timeseries.
  4. rungo get github.com/ompluscator/dynamic-struct to dynamically add field of json structs.

Usage

  1. rungo run main.go in your terminal and see options

    Alloc = 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
  2. choose your options and run

Example

$ 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

Results

Benchmark Results

img

Response RTT graph over time

img

Log Server

img

About

HTTP Benchmark Tool written in Golang. gotybench can generate randomized json objects which have key/type that produced by user.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp