loop3

package
v0.0.0-...-e29d1de Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockTypePlain           byte = 1
	BlockTypeLatencyRequest  byte = 2
	BlockTypeLatencyResponse byte = 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

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

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

type Metrics

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

type RandHashedBlock

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

func (*RandHashedBlock) PrepForSend

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

func (*RandHashedBlock) Rx

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

func (*RandHashedBlock) Tx

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

func (*RandHashedBlock) Verify

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

type Result

type Result struct {
	Success bool
	Message string
}

func (*Result) Rx

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

func (*Result) Tx

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

type SeqBlock []byte

func (SeqBlock) PrepForSend

func (s SeqBlock) PrepForSend(*protocol)

func (SeqBlock) Tx

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

func (SeqBlock) Verify

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

type Test

type Test struct {
	TxRequests   int32         `yaml:"txRequests"`
	TxPacing     time.Duration `yaml:"txPacing"`
	TxMaxJitter  time.Duration `yaml:"txMaxJitter"`
	TxPauseEvery time.Duration `yaml:"txPauseEvery"`
	TxPauseFor   time.Duration `yaml:"txPauseFor"`

	RxTimeout    int32         `yaml:"rxTimeout"`
	RxPacing     time.Duration `yaml:"rxPacing"`
	RxMaxJitter  time.Duration `yaml:"rxMaxJitter"`
	RxPauseEvery time.Duration `yaml:"rxPauseEvery"`
	RxPauseFor   time.Duration `yaml:"rxPauseFor"`

	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

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