sandeeprenjith / dnsblast

DNS Blast is a performance testing utility for DNS servers. It generates multiple simultaneous DNS queries against a specified DNS server and allows you to specify the rate of queries.
Other
37 stars 4 forks source link

Rate doesnt work properly #2

Closed sandeeprenjith closed 4 years ago

sandeeprenjith commented 4 years ago

When rate is specified as 3000 and len is specified as 10, the tool should send 3000 packets per second (or max possible) for 10 seconds. The average QPS and Latency should be printed to STDOUT once every second.

However, below is the output.

╭─nd33p@trv-wl-srenjith ~/go/src/github.com/sandeeprenjith/dnsblast ‹master›
╰─$ go run main.go -len 10 -server 192.168.130.9 -rate 3000                                                                                                                                 1 ↵
2019/11/03 18:07:25 QPS:  3000  Latency:  320.646µs
2019/11/03 18:07:27 QPS:  3000  Latency:  313.106µs
2019/11/03 18:07:29 QPS:  3000  Latency:  330.396µs
2019/11/03 18:07:32 QPS:  3000  Latency:  329.141µs

If 3000 queries cannot be achieved in 1 second, the tool sends 3000 queries (takes more than a second) and prints the output. The tool runs for 10 seconds and exits, printing output at only 4 intervals instead of 10.

sandeeprenjith commented 4 years ago

Fixed with 5d66fd35ca559e9fbfc71ea50d92155e5c80c3e9

sandeeprenjith commented 4 years ago

╭─nd33p@trv-wl-srenjith ~/go/src/github.com/sandeeprenjith/dnsblast ‹master› ╰─$ go run main.go -server 192.168.130.9 -rate 10000 -len 10 2019/11/14 14:54:21 QPS: 1892 Latency: 234.101µs 2019/11/14 14:54:22 QPS: 1867 Latency: 230.924µs 2019/11/14 14:54:23 QPS: 1827 Latency: 237.156µs 2019/11/14 14:54:24 QPS: 1865 Latency: 232.912µs 2019/11/14 14:54:25 QPS: 1814 Latency: 237.668µs 2019/11/14 14:54:26 QPS: 1872 Latency: 232.288µs 2019/11/14 14:54:27 QPS: 1726 Latency: 250.058µs 2019/11/14 14:54:28 QPS: 1831 Latency: 241.003µs 2019/11/14 14:54:29 QPS: 1858 Latency: 232.634µs