loadbot

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 27 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
	GRPC             string
	MaxConns         int
	GeneratorMode    Mode
	ChainID          uint64
	GasPrice         *big.Int
	GasLimit         *big.Int
	ContractArtifact *generator.ContractArtifact
}

type ExecDuration

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"`
	DetailedErrorData TxnDetailedErrorData `json:"detailedErrorData,omitempty"`
	ApproxTPS         uint64               `json:"approxTps"`
}

func (*LoadbotResult) Output

func (lr *LoadbotResult) Output() string

type Metrics

type Metrics struct {
	TotalTransactionsSentCount uint64
	FailedTransactionsCount    uint64
	TransactionDuration        ExecDuration
}

type Mode

type Mode string

type TxnBlockData

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

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

type TxnDetailedErrorData

type TxnDetailedErrorData struct {
	// DetailedErrorMap groups transaction errors by error type, with each transaction hash
	// mapping to its specific error
	DetailedErrorMap map[generator.TxnErrorType][]*generator.FailedTxnInfo `json:"detailedErrorMap"`
}

type TxnTurnAroundData

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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