dnsbench

package
v0.0.0-...-7bce159 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package dnsbench exports types and functions to run dns benchmark tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayReport

func DisplayReport(hist *hdrhistogram.Histogram, errors int64, dur float64)

DisplayReport prints a HDR histogram summary of a DNS benchmark run

func LocalResolve

func LocalResolve(names []string, count int, qps int, results chan<- *Result)

LocalResolve does DNS lookups using the local resolver

func ReadNames

func ReadNames(path string) ([]string, error)

ReadNames reads domain names from a given file and returns them in a slice

func Resolve

func Resolve(nameserver string, names []string, count int, qps int, results chan<- *Result)

Resolve does DNS lookups using specified nameserver

Types

type Result

type Result struct {
	Duration time.Duration
	Error    bool
}

Result holds the result of an individual dns lookup

type Stats

type Stats struct {
	Errors    int64
	Hist      *hdrhistogram.Histogram
	IntErrors int64
	IntHist   *hdrhistogram.Histogram
}

Stats holds a summary of DNS benchmark results

Jump to

Keyboard shortcuts

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