loadtest

package
v0.1.105 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoadtestCmd = &cobra.Command{
	Use:   "loadtest",
	Short: "Run a generic load test against an Eth/EVM style JSON-RPC endpoint.",
	Long:  loadtestUsage,
	Args:  cobra.NoArgs,
	PreRunE: func(cmd *cobra.Command, args []string) (err error) {
		cfg.RPCURL, err = flag.GetRPCURL(cmd)
		if err != nil {
			return err
		}
		cfg.PrivateKey, err = flag.GetPrivateKey(cmd)
		if err != nil {
			return err
		}
		zerolog.DurationFieldUnit = time.Second
		zerolog.DurationFieldInteger = true

		if gasManagerEnabled {
			if err = gasManagerCfg.Validate(); err != nil {
				return err
			}
		}

		return cfg.Validate()
	},
	RunE: func(cmd *cobra.Command, args []string) error {

		cfg.GasManager = nil
		if gasManagerEnabled {
			cfg.GasManager = gasManagerCfg
		}
		return loadtest.Run(cmd.Context(), cfg)
	},
}

LoadtestCmd represents the loadtest command.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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