Documentation
¶
Index ¶
- Constants
- Variables
- func EtherToWei(val *uint256.Int) *uint256.Int
- func GetBuildVersion() string
- func ReadFileLinesTrimmed(fname string) ([]string, error)
- func ReadableAmount(amount *uint256.Int) string
- func RecoverPanic(logger *logrus.Entry, routineName string) bool
- func RunTransactionScenario(ctx context.Context, options TransactionScenarioOptions) error
- func WeiToEther(val *uint256.Int) *uint256.Int
- type ABICallDataBuilder
- type FlexibleJsonUInt64
- type TransactionScenarioOptions
Constants ¶
View Source
const SecondsPerSlot uint64 = 12
Variables ¶
View Source
var BuildRelease string
View Source
var BuildTime string
View Source
var BuildVersion string
Functions ¶
func GetBuildVersion ¶
func GetBuildVersion() string
func ReadFileLinesTrimmed ¶
func ReadableAmount ¶ added in v1.1.4
func RecoverPanic ¶ added in v1.1.3
func RunTransactionScenario ¶ added in v1.1.3
func RunTransactionScenario(ctx context.Context, options TransactionScenarioOptions) error
RunTransactionScenario executes a controlled transaction scenario with rate limiting and concurrency management. It processes transactions according to the specified options until either context cancellation or reaching TotalCount (if > 0).
Features: - Rate-limited execution based on Throughput - Optional dynamic throughput increases - Concurrency control via MaxPending - Sequential logging via transaction chaining
Returns an error only if the scenario cannot be started. Transaction failures should be handled within ProcessNextTxFn.
Types ¶
type ABICallDataBuilder ¶ added in v1.1.4
type ABICallDataBuilder struct {
// contains filtered or unexported fields
}
func NewABICallDataBuilder ¶ added in v1.1.4
func NewABICallDataBuilder(callABI, callFnName, callFnSig, callArgs string) (*ABICallDataBuilder, error)
func (*ABICallDataBuilder) BuildCallData ¶ added in v1.1.4
func (b *ABICallDataBuilder) BuildCallData(txIdx uint64) ([]byte, error)
type FlexibleJsonUInt64 ¶ added in v1.1.2
type FlexibleJsonUInt64 uint64
func (*FlexibleJsonUInt64) UnmarshalJSON ¶ added in v1.1.2
func (f *FlexibleJsonUInt64) UnmarshalJSON(b []byte) error
func (*FlexibleJsonUInt64) UnmarshalYAML ¶ added in v1.1.2
func (f *FlexibleJsonUInt64) UnmarshalYAML(unmarshal func(interface{}) error) error
type TransactionScenarioOptions ¶ added in v1.1.3
type TransactionScenarioOptions struct {
TotalCount uint64
Throughput uint64
MaxPending uint64
ThroughputIncrementInterval uint64
// Logger for scenario execution information
Logger *logrus.Entry
// ProcessNextTxFn handles transaction execution with the given index
// It should return:
// - A callback function to log transaction results (can be nil)
// - An error if transaction creation failed
// - The onComplete callback must be called when transaction processing is complete
ProcessNextTxFn func(ctx context.Context, txIdx uint64, onComplete func()) (func(), error)
}
TransactionScenarioOptions configures how the transaction scenario is executed.
Click to show internal directories.
Click to hide internal directories.