app

package
v0.0.0-...-0852319 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Invalid byte = iota
	ACK
	EOM
	Heartbeat
	CommitChain
	CommitEntry
	RevealEntry
	DBSig
	Transaction
	MissingMsg
	MissingReply
	DBStateRequest
	DBStateReply
	StartRecording
	MESSAGEMAX
)

message ID

Variables

This section is empty.

Functions

func MessageName

func MessageName(b int) string

Types

type App

type App struct {
	Height int
	Minute int
	// contains filtered or unexported fields
}

func NewApp

func NewApp() *App

func (*App) ApplyLoad

func (a *App) ApplyLoad(generate bool, eps, feds, audits int)

func (*App) Launch

func (a *App) Launch(n network.Network)

func (*App) SendRandomizedMessage

func (a *App) SendRandomizedMessage()

func (*App) Settings

func (a *App) Settings() (bool, int, int, int)

func (*App) StartRecording

func (a *App) StartRecording()

func (*App) Stats

func (a *App) Stats() *Stats

type Generator

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

func NewGenerator

func NewGenerator(prct map[byte]float64) *Generator

func (*Generator) CreateMessage

func (g *Generator) CreateMessage(typ byte) []byte

func (*Generator) WeightedRandomType

func (g *Generator) WeightedRandomType() byte

type Replay

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

func NewReplay

func NewReplay(interval time.Duration, size uint) *Replay

func (*Replay) Dupe

func (r *Replay) Dupe(hash string) bool

type Stats

type Stats struct {
	NonDupeMessages []uint64
	Messages        []uint64
	Sent            []uint64

	TPS      uint64
	TPSCount uint64
	EPS      uint64
	EPSCount uint64

	Metrics network.Metrics
	// contains filtered or unexported fields
}

func (*Stats) AddMsg

func (s *Stats) AddMsg(msg byte, dupe bool)

func (*Stats) AddPS

func (s *Stats) AddPS(eps, tps uint64)

func (*Stats) AddSent

func (s *Stats) AddSent(msg byte, count uint64)

func (*Stats) Name

func (s *Stats) Name(b int) string

func (*Stats) Waste

func (s *Stats) Waste(b int) float64

Jump to

Keyboard shortcuts

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