Documentation ¶
Overview ¶
Example (Json_printReport) ¶
b, rs := testData() b.JSON = true b.Rcodes = true b.HistDisplay = true b.PrintReport([]*ResultStats{&rs}, time.Second)
Output: {"totalRequests":1,"totalSuccessCodes":4,"totalErrors":3,"TotalIDmismatch":6,"totalTruncatedResponses":7,"responseRcodes":{"NOERROR":2},"questionTypes":{"A":2},"queriesPerSecond":1,"benchmarkDurationSeconds":1,"latencyStats":{"minMs":0,"meanMs":0,"stdMs":0,"maxMs":0,"p99Ms":0,"p95Ms":0,"p90Ms":0,"p75Ms":0,"p50Ms":0},"latencyDistribution":[{"latencyMs":0,"count":0},{"latencyMs":0,"count":0},{"latencyMs":0,"count":0},{"latencyMs":0,"count":0},{"latencyMs":0,"count":0},{"latencyMs":0,"count":1},{"latencyMs":0,"count":0},{"latencyMs":0,"count":0},{"latencyMs":0,"count":0},{"latencyMs":0,"count":0},{"latencyMs":0,"count":1}]}
Example (Standard_printReport) ¶
b, rs := testData() b.PrintReport([]*ResultStats{&rs}, time.Second)
Output: Total requests: 1 Connection errors: 2 Read/Write errors: 3 ID mismatch errors: 6 DNS success codes: 4 Truncated responses: 7 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 Total Errors: 3 Top errors: test 2 (66.67)% test2 1 (33.33)%
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// Version is set during release of project during build process.
Version = "development"
)
Functions ¶
Types ¶
type Benchmark ¶
type Benchmark struct { Server string Types []string Count int64 Concurrency uint32 Rate int QperConn int64 Recurse bool Probability float64 UDPSize uint16 EdnsOpt string TCP bool DOT bool WriteTimeout time.Duration ReadTimeout time.Duration Rcodes bool HistDisplay bool HistMin time.Duration HistMax time.Duration HistPre int Csv string JSON bool Silent bool Color bool PlotDir string PlotFormat string DohMethod string DohProtocol string Insecure bool Queries []string Duration time.Duration // contains filtered or unexported fields }
Benchmark is representation of benchmark scenario.
func (*Benchmark) PrintReport ¶
func (b *Benchmark) PrintReport(stats []*ResultStats, t time.Duration) error
PrintReport print formatted benchmark results to stdout. If there is a fatal error while printing report, an error is returned.
type Counters ¶ added in v2.1.0
type Counters struct { Total int64 ConnError int64 IOError int64 Success int64 IDmismatch int64 Truncated int64 }
Counters represents various counters of benchmark results.
Click to show internal directories.
Click to hide internal directories.