app-traffic

command module
v0.0.0-...-52b781a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

Build

go build

Run

Usage of ./app-traffic:
  -h string
        Target Service "host:port"
  -p int
        DB Root Password
  -r int
        request per second
  -d int
        Execution time in seconds
  -t int
        Number of threads
  -e string
        Engine of DB [redis, mysql, mongo]
  -c int
        concurrent connections of each thread, only support mysql
  -complexity int
        complexity of query sql, only add count of select key
  -method string
        method of query, redis:[GET, SET]
  -sql string
        customizable sql of query, only support mysql
  • Example:
[root@iZ2zebdukco9jfpuo0shnaZ ~]# ./app-traffic -e redis -h 127.0.0.1:6379 -p deepflow -r 50000 -t 5 -d 10
2024/01/29 13:57:24 [*] Start redis App Traffic 127.0.0.1:6379, date rate 10000 rps.
2024/01/29 13:57:24 [*] Start redis App Traffic 127.0.0.1:6379, date rate 10000 rps.
2024/01/29 13:57:24 [*] Start redis App Traffic 127.0.0.1:6379, date rate 10000 rps.
2024/01/29 13:57:24 [*] Start redis App Traffic 127.0.0.1:6379, date rate 10000 rps.
2024/01/29 13:57:24 [*] Start redis App Traffic 127.0.0.1:6379, date rate 10000 rps.
now request count is 50020 , err is 0, cost time 1.001950s
now request count is 100021 , err is 0, cost time 2.001982s
now request count is 150068 , err is 0, cost time 3.002013s
now request count is 200076 , err is 0, cost time 4.002049s
now request count is 250076 , err is 0, cost time 5.002072s
now request count is 300076 , err is 0, cost time 6.002102s
now request count is 350040 , err is 0, cost time 7.002169s
now request count is 400082 , err is 0, cost time 8.002204s
now request count is 450070 , err is 0, cost time 9.002954s
now request count is 500071 , err is 0, cost time 10.002993s
total: 500395, count: 500395, error: 0, request/sec: 50024.43 avg: 39.512µs  max: 3.845947ms  p50: 34.687µs  p90: 62.392µs

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
test_server
grpcserver
Package main implements a server for Greeter service.
Package main implements a server for Greeter service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL