Documentation
¶
Index ¶
- Constants
- func MaxWorkers(workers int) func(*Runner)
- func Nameserver(ns string) func(*RemoteResolver)
- func Timeout(timeout time.Duration) func(*RemoteResolver)
- func Workers(workers int) func(*Runner)
- type LocalResolver
- type Name
- type Namer
- type RemoteResolver
- type Resolver
- type Result
- type Runner
- type TextReporter
Constants ¶
View Source
const ( DefaultNameserver = "8.8.8.8:53" DefaultTimeout = time.Second * 5 )
View Source
const ( // DefaultWorkers is the default initial worker count for a Runner. DefaultWorkers = 1 // DefaultMaxWorkers is the default maximum worker count for a Runner. DefaultMaxWorkers = 10 )
Variables ¶
This section is empty.
Functions ¶
func MaxWorkers ¶
MaxWorkers returns an options function which sets the maximum worker count for a Runner.
func Nameserver ¶
func Nameserver(ns string) func(*RemoteResolver)
func Timeout ¶
func Timeout(timeout time.Duration) func(*RemoteResolver)
Types ¶
type LocalResolver ¶
type LocalResolver struct{}
func NewLocalResolver ¶
func NewLocalResolver(opts ...func(*LocalResolver)) *LocalResolver
func (*LocalResolver) Resolve ¶
func (r *LocalResolver) Resolve(name Namer) *Result
type RemoteResolver ¶
type RemoteResolver struct {
// contains filtered or unexported fields
}
func NewRemoteResolver ¶
func NewRemoteResolver(opts ...func(*RemoteResolver)) *RemoteResolver
func (*RemoteResolver) Resolve ¶
func (r *RemoteResolver) Resolve(name Namer) *Result
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is a benchmark runner for a Resolver.
func (*Runner) NumWorkers ¶
NumWorkers returns the number of active workers.
type TextReporter ¶
type TextReporter struct {
// contains filtered or unexported fields
}
TextReporter is a reporter that writes simple text formatted information intented for human reading.
func NewTextReporter ¶
NewTextReporter returns a new TextReporter
func (*TextReporter) Display ¶
func (r *TextReporter) Display()
Display writes interval statistics to the configured output destination.
func (*TextReporter) NewInterval ¶
func (r *TextReporter) NewInterval()
NewInterval resets the current interval statistics.
func (*TextReporter) Summary ¶
func (r *TextReporter) Summary(run *Runner)
Summary writes end of run details.
func (*TextReporter) Update ¶
func (r *TextReporter) Update(res *Result)
Update records a new result.
Click to show internal directories.
Click to hide internal directories.