acceptance

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package acceptance provides infrascturctures for acceptance testing networks implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	*akita.TickingComponent

	Ports      []akita.Port
	MsgsToSend []akita.Msg
	// contains filtered or unexported fields
}

Agent can send and receive request.

func NewAgent

func NewAgent(
	engine akita.Engine,
	freq akita.Freq,
	name string,
	numPorts int,
	test *Test,
) *Agent

NewAgent creates a new agent.

func (*Agent) Tick

func (a *Agent) Tick(now akita.VTimeInSec) bool

Tick tries to receive requests and send requests out.

type Test

type Test struct {
	// contains filtered or unexported fields
}

Test is a test case.

func NewTest

func NewTest() *Test

NewTest creates a new test.

func (*Test) GenerateMsgs

func (t *Test) GenerateMsgs(n uint64)

GenerateMsgs generates n message from a random source port to a random destination port.

func (*Test) MustHaveReceivedAllMsgs

func (t *Test) MustHaveReceivedAllMsgs()

MustHaveReceivedAllMsgs asserts that all the messages sent are received.

func (*Test) RegisterAgent

func (t *Test) RegisterAgent(agent *Agent)

RegisterAgent adds an agent to the Test

func (*Test) ReportBandwidthAchieved

func (t *Test) ReportBandwidthAchieved(now akita.VTimeInSec)

ReportBandwidthAchieved dumps the bandwidth observed by each agents.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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