dnsbench

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2018 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

DNSBench

A simple DNS server benchmarking tool.

Have you ever needed to troubleshoot a DNS server? Or maybe you want to do some benchmarking before trouble arises. DNSBench is a simple command-line tool that can help you with that.

Installation

With Go installed:

go get -u github.com/askcom/dnsbench

Usage and examples

dnsbench <nameserver> [flags]
  -concurrency int
        Numer of concurrent requests (default 10)
  -count int
        Number of requests to make (default 1000)
  -interval duration
        Reporting interval (default 5s)
  -local
        Use local resolver
  -names string
        File containing names to request (default "-")
  -qps int
        QPS to attempt for each worker (0 for no limit)

Example 1: Benchmark DNS using local resolver:

$ echo "example.com" | dnsbench -local

Reading names from /dev/stdin
Benchmarking...

# requests errors min  [ p50  p95  p99  p999] max  qps

Finished 1000 requests

# latency summary
   1000       0   2.21    [6.31 24.12 36.80 72.35] 72.35  639.33

Concurrency level: 10
Time taken for tests: 1.56 seconds
Completed Requests: 1000
Failed Requests: 0
Requests per second: 639.33 [#/sec] (mean)
Time per request: 8.23 [ms] (mean)
Fastest request: 2.21 [ms]
Slowest request: 72.35 [ms]

Example 2: Benchmark a specified nameserver with a file of domains:

dnsbench <nameserver ip> -names "domains_to_lookup.txt"

Reading names from domains_to_lookup.txt
Benchmarking...

with domains listed on individual lines of domains_to_lookup.txt, such as:

example.com
google.com
foobar.com

Status

DNSBench is currently under active development with upcoming improvements targetting:

  • Documentation
  • Command-line useability
  • Decoupling command-line and DNS lookup logic of source
  • Testing

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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