internal

package
v0.0.0-...-f702d8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

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 NewDischargeServer

func NewDischargeServer(ctx *context.T) security.Caveat

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

type StreamStatus struct {
	Iterations int
	Written    int
}

StreamStatus represents the number of iterations and the total bytes written (in one direction) over the stream.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL