Documentation ¶
Index ¶
- func CallEcho(b *testing.B, ctx *context.T, address string, iterations, payloadSize int, ...)
- func CallEchoStream(b *testing.B, ctx *context.T, address string, ...)
- func NewDischargeServer(ctx *context.T) security.Caveat
- func NewService() benchmark.BenchmarkServerStub
- func StartEchoStream(b *testing.B, ctx *context.T, address string, ...) (<-chan StreamStatus, func())
- type StreamStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallEcho ¶
func CallEcho(b *testing.B, ctx *context.T, address string, iterations, payloadSize int, random bool, stats *tbm.Stats)
CallEcho calls 'Echo' method 'iterations' times with the given payload size or a random payload size (up to payloadSize) if random is specified
func CallEchoStream ¶
func CallEchoStream(b *testing.B, ctx *context.T, address string, iterations, chunkCnt, payloadSize int, random bool, stats *tbm.Stats)
CallEchoStream calls 'EchoStream' method 'iterations' times. Each iteration sends 'chunkCnt' chunks on the stream and receives the same number of chunks back. Each chunk has the given payload size.
func NewService ¶
func NewService() benchmark.BenchmarkServerStub
func StartEchoStream ¶
func StartEchoStream(b *testing.B, ctx *context.T, address string, iterations, chunkCnt, payloadSize int, random bool, stats *tbm.Stats) (<-chan StreamStatus, func())
startEchoStream starts to call 'EchoStream' method 'iterations' times. This does not block, and returns a channel that will receive the number of iterations and total bytes written (StreamStatus) when it's done. It also returns a callback function to stop the streaming. Each iteration requests 'chunkCnt' chunks on the stream and receives that number of chunks back. Each chunk has the given payload size (or randomized). Zero 'iterations' means unlimited.
Types ¶
type StreamStatus ¶
StreamStatus represents the number of iterations and the total bytes written (in one direction) over the stream.