Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(t *testing.T, queries io.Reader, addr, network string, duration time.Duration, count int) error
Run runs dnsperf which read the queries from the io.Reader and benchmarks the server running on addr. The test runs for duration. The thread count is set the runtime.NumCPU/2, as both the server and requestor are running on the same machine. I.e.
Run(q, "127.0.0.1:8053", udp, 2*time.Second, 10)
runs: "dnsperf -s 127.0.0.1 -p 8053 -l 2 -c 2 -T 2", 10 times (if runtime.NumCPU returns 4).
See dnsperf on how to create queries. The queries io.Reader is drained and placed in a file.
The output is simular to running Go benchmark tests and can be used in benchstat. See https://pkg.go.dev/golang.org/x/perf/cmd/benchstat
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.