{"id":18542221,"url":"https://github.com/ghkdqhrbals/gotybench","last_synced_at":"2025-05-15T04:36:25.838Z","repository":{"id":103816443,"uuid":"589946543","full_name":"ghkdqhrbals/gotybench","owner":"ghkdqhrbals","description":"HTTP Benchmark Tool written in Golang. gotybench can generate randomized json objects which have key/type that produced by user.","archived":false,"fork":false,"pushed_at":"2024-02-27T12:13:45.000Z","size":38380,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T04:35:42.717Z","etag":null,"topics":["benchmark","fuzzing","golang","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghkdqhrbals.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-17T10:09:44.000Z","updated_at":"2023-06-08T08:15:53.000Z","dependencies_parsed_at":"2025-02-17T08:43:04.136Z","dependency_job_id":"9b446fcc-7312-475a-9c74-fe64ec5eef40","html_url":"https://github.com/ghkdqhrbals/gotybench","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghkdqhrbals%2Fgotybench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghkdqhrbals%2Fgotybench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghkdqhrbals%2Fgotybench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghkdqhrbals%2Fgotybench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghkdqhrbals","download_url":"https://codeload.github.com/ghkdqhrbals/gotybench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254274827,"owners_count":22043587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","fuzzing","golang","rest-api"],"created_at":"2024-11-06T20:07:45.948Z","updated_at":"2025-05-15T04:36:25.818Z","avatar_url":"https://github.com/ghkdqhrbals.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\n* GotyBench was designed for **testing server load** with multiple current threads\n\u003e Currently we service only for HTTP Post request! Later we will add Get/Put Methods\n\n![](img/24.gif)\n\n\n# Goal of GotyBench\n\n1. Testing with multiple concurrency : Developed with goroutine lightweight multi-threaded, set to communicate through channels.\n2. 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.\n    * ex) \"gotybench -j [userId,string,userAge,int]\" : Set the value of `userId` to a random string. Also set the value of `userAge` to a random int.\n3. Log server : By `-s` option, we can check all benchmark logs([http://localhost:8022](http://localhost:8022))\n\n# Options\n| Option | Detail                                                                                                                                                                                                                                                                                               |\n|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| -c     | The number of concurrent thread                                                                                                                                                                                                                                                                      |\n| -h     | See all options                                                                                                                                                                                                                                                                                      |\n| -j     | Generate fuzzed json object \u003cbr\u003e If you set the key/type of the json object with the corresponding option, a json object with a random value is created.\u003cbr\u003eFour types of fuzzing are supported as follows.\u003cbr\u003eint, float, string, boolean\u003cbr\u003eUsage Example\u003cbr\u003eex) `-j \"[userId,string,userAge,int]\"` |\n| -r     | The number of HTTP Post request                                                                                                                                                                                                                                                                      |\n| -t     | The timeout of the network connection of the benchmark client                                                                                                                                                                                                                                        |\n| -u     | Request URL                                                                                                                                                                                                                                                                                          |\n| -s     | Access log server                                                                                                                                                                                                                                                                                    |\n| -i     | Add additional information                                                                                                                                                                                                                                                                           |\n\n# Before we started, we need to get ...\n1. run `go get github.com/fatih/color` for coloring your terminal\n2. run `go get -v github.com/gosuri/uilive` for updating process\n3. run `go get -u github.com/go-echarts/go-echarts/v2/...` to see graph with responses in timeseries.\n4. run `go get github.com/ompluscator/dynamic-struct` to dynamically add field of json structs.\n\n# Usage\n1. run `go run main.go` in your terminal and see options\n\n\t```bash\n\tAlloc = 0 MiB\tTotalAlloc = 0 MiB\tSys = 8 MiB\tNumGC = 0\n\t\tProperties\n\t\t- Max parallelism : 8\n\tUsage of /var/folders/h0/_d_zrr0j57x8wmknjb1r6hfm0000gn/T/go-build3252492082/b001/exe/main:\n\t-c int\n\t\t\t스레드 개수 (default 100)\n\t-j string\n\t\t\tJson \"[KEY1,TYPE1,KEY2,TYPE2,...]\" \n\t-r int\n\t\t\t요청 개수 (default 10000)\n\t-t int\n\t\t\t요청 타임아웃(second) (default 30)\n\t-u string\n\t\t\tURL\n\t```                                                    \n2. choose your options and run\n\n# Example\n\n```bash\n$ 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\n\n [Properties]\n- Max parallelism : 8\n- Request url : http://127.0.0.1:8080/auth/user\n- The number of HTTP Requests : 10000\n- The number of threads : 100\nListening server's response .. (10000/10000)\n\n [Results]\n---------------------------------------------------------\n| Response Status \t| Count \t| Percent \t|\n| 200 \t\t\t| 10000/10000 \t| 100.0%\t|\n---------------------------------------------------------\n- Average response time \t: 110.66 ms\n- Max response time     \t: 770.32 ms\n- Min response time     \t: 21.46 ms\n\n [Memory Usage]\n- Heap size = 2 MB\n- Cumulative Heap size = 161 MB\n- All goroutine size = 22 MB\n- GC cycle 횟수 = 48\n\nFinished! ( Total Elapsed Time : 11.4659 seconds ) \nNow you can see response time series graph in local machine =\u003e http://localhost:8022 \n\n```\n\n# Results\n\n### **Benchmark Results**\n![img](img/27.png)\n### **Response RTT graph over time**\n![img](img/28.png)\n### **Log Server**\n![img](img/29.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghkdqhrbals%2Fgotybench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghkdqhrbals%2Fgotybench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghkdqhrbals%2Fgotybench/lists"}