Randomizing benchmarks

In some cases, you might want to randomize the DNS queries generated by the dnspyre. This is especially useful, when you are running a dnspyre in concurrent mode (--concurrency > 1) and you would like to better simulate real-life scenarios. Without using --probability flag, all the concurrent workers generated by the benchmark run are generating exactly the same queries, this might have a downside that most of the DNS queries will be served from the cache.

You can randomize queries fired by each concurrent thread by using --probability flag and specifying probability lesser than 1, in this example, roughly every third hostname from the data source is used by each concurrent benchmark thread.

together with probability option this can be used for generating arbitrary random load

dnspyre --duration 30s -c 10 --server 8.8.8.8 -t A -t AAAA https://raw.githubusercontent.com/Tantalor93/dnspyre/master/data/1000-domains --probability 0.33