You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/loadtest/app.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,7 @@ type (
86
86
AddressFundingAmount*uint64
87
87
PreFundSendingAddresses*bool
88
88
KeepFundedAmount*bool
89
+
SendingAddressesFile*string
89
90
90
91
// Computed
91
92
CurrentGasPrice*big.Int
@@ -250,6 +251,7 @@ func initFlags() {
250
251
ltp.AddressFundingAmount=LoadtestCmd.Flags().Uint64("address-funding-amount", 1000000000000000000, "The amount in gwei to fund the sending addresses with.")
251
252
ltp.PreFundSendingAddresses=LoadtestCmd.Flags().Bool("pre-fund-sending-addresses", false, "If set to true, the sending addresses will be fund at the start of the execution, otherwise all addresses will be funded when used for the first time.")
252
253
ltp.KeepFundedAmount=LoadtestCmd.Flags().Bool("keep-funded-amount", false, "If set to true, the funded amount will be kept in the sending addresses. Otherwise, the funded amount will be refunded back to the account used to fund the account.")
254
+
ltp.SendingAddressesFile=LoadtestCmd.Flags().String("sending-addresses-file", "", "The file containing the sending addresses private keys, one per line. This is useful for avoiding pool account queue but also to keep the same sending addresses for different execution cycles.")
253
255
254
256
// Local flags.
255
257
ltp.Modes=LoadtestCmd.Flags().StringSliceP("mode", "m", []string{"t"}, `The testing mode to use. It can be multiple like: "c,d,f,t"
Copy file name to clipboardExpand all lines: doc/polycli_loadtest.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,18 +117,18 @@ The codebase has a contract that used for load testing. It's written in Solidity
117
117
--contract-call-payable Use this flag if the function is payable, the value amount passed will be from --eth-amount. This must be paired up with --mode contract-call and --contract-address
118
118
--erc20-address string The address of a pre-deployed ERC20 contract
119
119
--erc721-address string The address of a pre-deployed ERC721 contract
120
-
--eth-amount float The amount of ether to send on every transaction
120
+
--eth-amount uintThe amount of ether in wei to send on every transaction
121
121
--force-contract-deploy Some load test modes don't require a contract deployment. Set this flag to true to force contract deployments. This will still respect the --lt-address flags.
122
122
-f, --function uint A specific functionto be called if running with --mode f or a specific precompiled contract when running with --mode a (default 1)
123
123
--function-arg strings The arguments that will be passed to a contract functioncall. This must be paired up with "--mode contract-call" and "--contract-address". Args can be passed multiple times: "--function-arg 'test' --function-arg 999" or comma separated values "--function-arg "test",9". The ordering of the arguments must match the ordering of the functionparameters.
124
124
--function-signature string The contract's function signature that will be called. The format is '<function name>(<types...>)'. This must be paired up with '--mode contract-call' and '--contract-address'. If the function requires parameters you can pass them with '--function-arg <value>'.
125
-
--fund-sending-addresses-on-demand If set to true, the sending addresses will be funded when used for the first time, otherwise all addresses will be fund at the start of the execution. (default true)
126
125
--gas-limit uint In environments where the gas limit can't be computed on the fly, we can specify it manually. This can also be used to avoid eth_estimateGas
127
126
--gas-price uint In environments where the gas price can't be determined automatically, we can specify it manually
128
127
--gas-price-multiplier float A multiplier to increase or decrease the gas price (default 1)
129
128
-h, --help help for loadtest
130
129
--inscription-content string The inscription content that will be encoded as calldata. This must be paired up with --mode inscription (default "data:,{\"p\":\"erc-20\",\"op\":\"mint\",\"tick\":\"TEST\",\"amt\":\"1\"}")
131
130
-i, --iterations uint If we're making contract calls, this controls how many times the contract will execute the instruction in a loop. If we are making ERC721 Mints, this indicates the minting batch size (default 1)
131
+
--keep-funded-amount If set to true, the funded amount will be kept in the sending addresses. Otherwise, the funded amount will be refunded back to the account used to fund the account.
132
132
--legacy Send a legacy transaction instead of an EIP1559 transaction.
133
133
--lt-address string The address of a pre-deployed load test contract
134
134
-m, --mode strings The testing mode to use. It can be multiple like: "c,d,f,t"
@@ -151,6 +151,7 @@ The codebase has a contract that used for load testing. It's written in Solidity
--nonce uint Use this flag to manually set the starting nonce
153
153
--output-mode string Format mode for summary output (json | text) (default "text")
154
+
--pre-fund-sending-addresses If set to true, the sending addresses will be fund at the start of the execution, otherwise all addresses will be funded when used for the first time.
154
155
--priority-gas-price uint Specify Gas Tip Price in the case of EIP-1559
155
156
--private-key string The hex encoded private key that we'll use to send transactions (default "42b6e34dc21598a807dc19d7784c71b2a7a01f6480dc6f58258f78e539f1a1fa")
156
157
--rate-limit float An overall limit to the number of requests per second. Give a number less than zero to remove this limit all together (default 4)
@@ -160,6 +161,7 @@ The codebase has a contract that used for load testing. It's written in Solidity
160
161
--seed int A seed for generating random values and addresses (default 123456)
161
162
--send-only Send transactions and load without waiting for it to be mined.
162
163
--sending-address-count uint The number of sending addresses to use. This is useful for avoiding pool account queue. (default 1)
164
+
--sending-addresses-file string The file containing the sending addresses private keys, one per line. This is useful for avoiding pool account queue but also to keep the same sending addresses for different execution cycles.
163
165
--steady-state-tx-pool-size uint When using adaptive rate limiting, this value sets the target queue size. If the queue is smaller than this value, we'll speed up. If the queue is smaller than this value, we'll back off. (default 1000)
164
166
--summarize Should we produce an execution summary after the load test has finished. If you're running a large load test, this can take a long time
165
167
-t, --time-limit int Maximum number of seconds to spend for benchmarking. Use this to benchmark within a fixed total amount of time. Per default there is no time limit. (default -1)
Copy file name to clipboardExpand all lines: doc/polycli_loadtest_uniswapv3.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ The command also inherits flags from parent commands.
86
86
--chain-id uint The chain id for the transactions.
87
87
-c, --concurrency int Number of requests to perform concurrently. Default is one request at a time. (default 1)
88
88
--config string config file (default is $HOME/.polygon-cli.yaml)
89
-
--eth-amount float The amount of ether to send on every transaction
89
+
--eth-amount uintThe amount of ether in wei to send on every transaction
90
90
--gas-limit uint In environments where the gas limit can't be computed on the fly, we can specify it manually. This can also be used to avoid eth_estimateGas
91
91
--gas-price uint In environments where the gas price can't be determined automatically, we can specify it manually
92
92
--gas-price-multiplier float A multiplier to increase or decrease the gas price (default 1)
0 commit comments