load

package
v1.13.4-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallDepthTest

type CallDepthTest struct {
	Contract *contracts.EVMLoadSimulator
	Count    *big.Int
}

func (CallDepthTest) Run

func (c CallDepthTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type ContractCreationTest

type ContractCreationTest struct {
	Contract *contracts.EVMLoadSimulator
}

func (ContractCreationTest) Run

func (c ContractCreationTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type ExternalCallTest

type ExternalCallTest struct {
	Contract *contracts.EVMLoadSimulator
}

func (ExternalCallTest) Run

func (e ExternalCallTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type HashingTest

type HashingTest struct {
	Contract *contracts.EVMLoadSimulator
	Count    *big.Int
}

func (HashingTest) Run

func (h HashingTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type LargeEventTest

type LargeEventTest struct {
	Contract  *contracts.EVMLoadSimulator
	NumEvents *big.Int
}

func (LargeEventTest) Run

func (l LargeEventTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type LoadGenerator

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

func NewLoadGenerator

func NewLoadGenerator(
	workers []Worker,
	chainID *big.Int,
	metricsNamespace string,
	registry *prometheus.Registry,
	test Test,
) (LoadGenerator, error)

func (LoadGenerator) Run

func (l LoadGenerator) Run(
	ctx context.Context,
	log logging.Logger,
	loadTimeout time.Duration,
	testTimeout time.Duration,
)

type MemoryTest

type MemoryTest struct {
	Contract *contracts.EVMLoadSimulator
	Count    *big.Int
}

func (MemoryTest) Run

func (m MemoryTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type PureComputeTest

type PureComputeTest struct {
	Contract      *contracts.EVMLoadSimulator
	NumIterations *big.Int
}

func (PureComputeTest) Run

func (p PureComputeTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type RandomWeightedTest

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

func NewRandomTest

func NewRandomTest(
	ctx context.Context,
	chainID *big.Int,
	worker *Worker,
	source rand.Source,
) (*RandomWeightedTest, error)

NewRandomTest creates a RandomWeightedTest containing a collection of EVM load testing scenarios.

This function handles the setup of the tests and also assigns each test an equal weight, making them equally likely to be selected during random test execution.

func NewRandomWeightedTest

func NewRandomWeightedTest(
	weightedTests []WeightedTest,
	source rand.Source,
) (*RandomWeightedTest, error)

func (*RandomWeightedTest) Run

func (r *RandomWeightedTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type ReadTest

type ReadTest struct {
	Contract *contracts.EVMLoadSimulator
	Count    *big.Int
}

func (ReadTest) Run

func (r ReadTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type StateModificationTest

type StateModificationTest struct {
	Contract *contracts.EVMLoadSimulator
	Count    *big.Int
}

func (StateModificationTest) Run

func (s StateModificationTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type Test

type Test interface {
	Run(tc tests.TestContext, ctx context.Context, wallet *Wallet)
}

type TransferTest

type TransferTest struct {
	Value *big.Int
}

func (TransferTest) Run

func (t TransferTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type TrieStressTest

type TrieStressTest struct {
	Contract  *contracts.TrieStressTest
	NumValues *big.Int
}

func (TrieStressTest) Run

func (t TrieStressTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

type Wallet

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

func (*Wallet) SendTx

func (w *Wallet) SendTx(
	ctx context.Context,
	tx *types.Transaction,
) error

type WeightedTest

type WeightedTest struct {
	Test   Test
	Weight uint64
}

type Worker

type Worker struct {
	PrivKey *ecdsa.PrivateKey
	Nonce   uint64
	Client  *ethclient.Client
}

type WriteTest

type WriteTest struct {
	Contract *contracts.EVMLoadSimulator
	Count    *big.Int
}

func (WriteTest) Run

func (w WriteTest) Run(
	tc tests.TestContext,
	ctx context.Context,
	wallet *Wallet,
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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