loop3

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockTypePlain           byte = 1
	BlockTypeLatencyRequest       = 2
	BlockTypeLatencyResponse      = 3
)

Variables

View Source
var BytesRxRate = metrics.NewMeter()
View Source
var BytesTxRate = metrics.NewMeter()
View Source
var ConnectionTime = metrics.NewTimer()
View Source
var MagicHeader = []byte{0xCA, 0xFE, 0xF0, 0x0D}
View Source
var MsgLatency = metrics.NewTimer()
View Source
var MsgRxRate = metrics.NewMeter()
View Source
var MsgTxRate = metrics.NewMeter()

Functions

func StartMetricsReporter added in v0.16.5

func StartMetricsReporter(configFile string, metrics *Metrics, closer chan struct{}) error

Types

type Block

type Block interface {
	PrepForSend(p *protocol)
	Tx(p *protocol) error
	Verify(p *protocol) error
}

type Message added in v0.16.5

type Message interface {
	Tx(p *protocol) error
	Rx(p *protocol) error
}

type Metrics added in v0.16.5

type Metrics struct {
	Service        string        `yaml:"service"`
	ReportInterval time.Duration `yaml:"interval"`
	ClientId       string        `yaml:"clientId"`
}

type RandHashedBlock added in v0.17.6

type RandHashedBlock struct {
	Type      byte
	Sequence  uint32
	Hash      []byte
	Data      []byte
	Timestamp time.Time
}

func (*RandHashedBlock) PrepForSend added in v0.17.6

func (block *RandHashedBlock) PrepForSend(p *protocol)

func (*RandHashedBlock) Rx added in v0.17.6

func (block *RandHashedBlock) Rx(p *protocol) error

func (*RandHashedBlock) Tx added in v0.17.6

func (block *RandHashedBlock) Tx(p *protocol) error

func (*RandHashedBlock) Verify added in v0.17.6

func (block *RandHashedBlock) Verify(p *protocol) error

type Result added in v0.16.5

type Result struct {
	Success bool
	Message string
}

func (*Result) Rx added in v0.16.5

func (r *Result) Rx(p *protocol) error

func (*Result) Tx added in v0.16.5

func (r *Result) Tx(p *protocol) error

type Scenario

type Scenario struct {
	Workloads       []*Workload `yaml:"workloads"`
	ConnectionDelay int32       `yaml:"connectionDelay"`
	Metrics         *Metrics    `yaml:"metrics"`
}

func LoadScenario

func LoadScenario(path string) (*Scenario, error)

func (*Scenario) String

func (scenario *Scenario) String() string

type SeqBlock added in v0.17.6

type SeqBlock []byte

func (SeqBlock) PrepForSend added in v0.17.6

func (s SeqBlock) PrepForSend(*protocol)

func (SeqBlock) Tx added in v0.17.6

func (s SeqBlock) Tx(p *protocol) error

func (SeqBlock) Verify added in v0.17.6

func (block SeqBlock) Verify(p *protocol) error

type Test

type Test struct {
	TxRequests       int32  `yaml:"txRequests"`
	TxPacing         int32  `yaml:"txPacing"`
	TxMaxJitter      int32  `yaml:"txMaxJitter"`
	RxTimeout        int32  `yaml:"rxTimeout"`
	PayloadMinBytes  int32  `yaml:"payloadMinBytes"`
	PayloadMaxBytes  int32  `yaml:"payloadMaxBytes"`
	LatencyFrequency int32  `yaml:"latencyFrequency"`
	BlockType        string `yaml:"blockType"`
}

type Workload

type Workload struct {
	Name        string `yaml:"name"`
	Concurrency int32  `yaml:"concurrency"`
	Dialer      Test   `yaml:"dialer"`
	Listener    Test   `yaml:"listener"`
}

func (*Workload) GetTests added in v0.17.6

func (workload *Workload) GetTests() (*loop3_pb.Test, *loop3_pb.Test)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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