loadbot

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: LGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Address    types.Address
	PrivateKey *ecdsa.PrivateKey
}

type Configuration

type Configuration struct {
	TPS      uint64
	Sender   types.Address
	Receiver types.Address
	Value    *big.Int
	Count    uint64
	JSONRPC  string
	MaxConns int
}

type ExecDuration added in v0.1.0

type ExecDuration struct {

	// AverageTurnAround is the average turn around time for all passing transactions
	AverageTurnAround time.Duration

	// FastestTurnAround is the fastest turn around time recorded for a transaction
	FastestTurnAround time.Duration

	// SlowestTurnAround is the slowest turn around time recorded for a transaction
	SlowestTurnAround time.Duration

	// TotalExecTime is the total execution time for a single loadbot run
	TotalExecTime time.Duration
	// contains filtered or unexported fields
}

type Loadbot

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

func NewLoadBot

func NewLoadBot(cfg *Configuration, metrics *Metrics) *Loadbot

func (*Loadbot) Run

func (l *Loadbot) Run() error

type LoadbotCommand

type LoadbotCommand struct {
	helper.Base
	Formatter *helper.FormatterFlag
}

func (*LoadbotCommand) DefineFlags

func (l *LoadbotCommand) DefineFlags()

func (*LoadbotCommand) GetBaseCommand

func (l *LoadbotCommand) GetBaseCommand() string

func (*LoadbotCommand) GetHelperText

func (l *LoadbotCommand) GetHelperText() string

func (*LoadbotCommand) Help

func (l *LoadbotCommand) Help() string

func (*LoadbotCommand) Run

func (l *LoadbotCommand) Run(args []string) int

func (*LoadbotCommand) Synopsis

func (l *LoadbotCommand) Synopsis() string

type LoadbotResult

type LoadbotResult struct {
	CountData      TxnCountData      `json:"countData"`
	TurnAroundData TxnTurnAroundData `json:"turnAroundData"`
	BlockData      TxnBlockData      `json:"blockData"`
}

func (*LoadbotResult) Output

func (lr *LoadbotResult) Output() string

type Metrics

type Metrics struct {
	TotalTransactionsSentCount uint64
	FailedTransactionsCount    uint64
	TransactionDuration        ExecDuration
}

type TxnBlockData added in v0.1.0

type TxnBlockData struct {
	// BlocksRequired is the required number of blocks to seal the data
	BlocksRequired uint64 `json:"blocksRequired"`

	// BlockTransactionsMap maps the block number to the number of loadbot transactions in it
	BlockTransactionsMap map[uint64]uint64 `json:"blockTransactionsMap"`
}

type TxnCountData added in v0.1.0

type TxnCountData struct {
	Total  uint64 `json:"total"`
	Failed uint64 `json:"failed"`
}

type TxnTurnAroundData added in v0.1.0

type TxnTurnAroundData struct {
	FastestTurnAround float64 `json:"fastestTurnAround"`
	SlowestTurnAround float64 `json:"slowestTurnAround"`
	AverageTurnAround float64 `json:"averageTurnAround"`
	TotalExecTime     float64 `json:"totalExecTime"`
}

Jump to

Keyboard shortcuts

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