Documentation ¶
Overview ¶
Package test contains helpers for setting up test utilties.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBenchMessage ¶
NewBenchMessage creates a message carrying information used to calc benchmarks on the other end of a transport.
func StartPrintingBenchmarks ¶
StartPrintingBenchmarks starts a goroutine that will periodically print any statistics/benchmarks that are accumulated through messages, and also any lost interactions as per the startIndex. If you want to disable data loss detection then set the startIndex to -1. 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 int32 // The index carried by a message, can be used to detect loss. }
Bench is a struct carrying message specific benchmarking statistics.
Click to show internal directories.
Click to hide internal directories.