Help us shape the future of Go! Take the 2026 Go Developer Survey

loadtest

package
v0.1.120 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 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,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
		cfg.RPCURL, err = flag.GetRPCURL(cmd)
		if err != nil {
			return err
		}
		cfg.StartNonceSet = cmd.Flags().Changed("nonce")
		cfg.PrivateKey, err = flag.GetPrivateKey(cmd)
		if err != nil {
			return err
		}
		zerolog.DurationFieldUnit = time.Second
		zerolog.DurationFieldInteger = true

		cfg.Headers, err = config.ParseRPCHeaders(cfg.RPCHeaders)
		if err != nil {
			return err
		}

		if gasManagerCfg.Enabled {
			if err = gasManagerCfg.Validate(); err != nil {
				return err
			}
			cfg.GasManager = gasManagerCfg
		}

		return nil
	},
	PreRunE: func(cmd *cobra.Command, args []string) error {
		return cfg.Validate()
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		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