dnstrace

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Example (PrintReport)
pExpect = &[]string{"A"}

h := hdrhistogram.New(pHistMin.Nanoseconds(), pHistMax.Nanoseconds(), 1)
h.RecordValue(5)
h.RecordValue(10)
d1 := datapoint{5, time.Unix(0, 0)}
d2 := datapoint{10, time.Unix(0, 0)}
rs := rstats{
	codes: map[int]int64{
		dns.RcodeSuccess: 2,
	},
	qtypes: map[string]int64{
		"A": 2,
	},
	hist:      h,
	timings:   []datapoint{d1, d2},
	count:     1,
	cerror:    2,
	ecount:    3,
	success:   4,
	matched:   5,
	mismatch:  6,
	truncated: 7,
}

printReport(time.Second, []*rstats{&rs}, nil)
Output:

Total requests:		1
Connection errors:	2
Read/Write errors:	3
ID mismatch errors:	6
DNS success codes:	4
Truncated responses:	7
Expected results:	5

DNS response codes:
	NOERROR:	2

DNS question types:
	A:	2

Time taken for tests:	 1s
Questions per second:	 1.0
DNS timings, 2 datapoints
	 min:		 5ns
	 mean:		 7ns
	 [+/-sd]:	 2ns
	 max:		 10ns
	 p99:		 10ns
	 p95:		 10ns
	 p90:		 10ns
	 p75:		 10ns
	 p50:		 5ns

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// Version is set during release of project during build process
	Version = "development"
)

Functions

func Execute

func Execute()

Execute starts main logic of command

Types

This section is empty.

Jump to

Keyboard shortcuts

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