Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Benchmarker ¶
type Benchmarker struct {
Config *config.Config
Results *analysis.BenchmarkResults
Limiter *rate.Limiter
// ProgressWriter, when non-nil, receives an in-place progress line during
// Run (intended for an interactive stderr). Nil disables progress output.
ProgressWriter io.Writer
// contains filtered or unexported fields
}
Benchmarker manages the benchmarking process.
func NewBenchmarker ¶
func NewBenchmarker(cfg *config.Config) *Benchmarker
NewBenchmarker creates a new Benchmarker instance.
func (*Benchmarker) Close ¶ added in v1.6.0
func (b *Benchmarker) Close()
Close releases benchmark-scoped resources.
func (*Benchmarker) Run ¶
func (b *Benchmarker) Run(ctx context.Context) *analysis.BenchmarkResults
Run performs the benchmark against the configured servers. Cancelling ctx stops the benchmark early; results collected so far remain valid, with the unattempted queries recorded as skipped.
type QueryOutcome ¶ added in v1.6.0
type QueryOutcome string
QueryOutcome classifies the outcome of a DNS query attempt.
const ( OutcomeSuccess QueryOutcome = "success" OutcomeDNSFailure QueryOutcome = "dns_failure" OutcomeTimeout QueryOutcome = "timeout" OutcomeTransport QueryOutcome = "transport_error" OutcomeMalformed QueryOutcome = "malformed_response" )
type QueryResult ¶
QueryResult holds the result of a single DNS query.
type ResponseValidationError ¶ added in v1.6.0
type ResponseValidationError struct {
Reason string
}
ResponseValidationError indicates a DNS response failed structural validation (wrong ID, missing Response bit, question mismatch, etc.).
func (*ResponseValidationError) Error ¶ added in v1.6.0
func (e *ResponseValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.