Documentation ¶
Overview ¶
Package test contains helpers for setting up test utilties.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBenchOutput ¶ added in v0.7.2
NewBenchOutput creates a new BenchOutput output type.
func StartPrintingBenchmarks ¶
StartPrintingBenchmarks starts a goroutine that will periodically print any statistics/benchmarks that are accumulated through messages. You must provide the messages via the write channel returned by the function.
Types ¶
type Bench ¶
type Bench struct { Latency int // Time taken (ns) for a message to be received by a consumer NBytes int // Number of bytes carried in the message Index uint64 // The index carried by a message, can be used to detect loss }
Bench is a struct carrying message specific benchmarking statistics.
type BenchOutput ¶ added in v0.7.2
type BenchOutput struct {
// contains filtered or unexported fields
}
BenchOutput is an output type that prints benchmark information to stdout.
func (*BenchOutput) CloseAsync ¶ added in v0.7.2
func (o *BenchOutput) CloseAsync()
CloseAsync shuts down the File output and stops processing messages.
func (*BenchOutput) StartReceiving ¶ added in v0.7.2
func (o *BenchOutput) StartReceiving(ts <-chan types.Transaction) error
StartReceiving assigns a messages channel for the output to read.
func (*BenchOutput) WaitForClose ¶ added in v0.7.2
func (o *BenchOutput) WaitForClose(timeout time.Duration) error
WaitForClose blocks until the File output has closed down.