-
deploy-contract-public.jmx
test plan fire transactions to deploy new contracts to the network viajson-rpc
requests. The contract being deployed is aSimpleStorage
contract, with a random value being initialised in the constructor.Parameters that can be specified include
url
: The RPC endpoint urlinfluxdburl
: influxdb url for capturing metrics. Refer here on how to disable influxdb.port
: The RPC endpoint portfrom
: Geth account used to send transactions fromthreads
: Number of threads use to send transactionsseconds
: Duration of the test run in secondsdelay
: Startup delay (default to 5 seconds)throughput
: (value is transactions per minute). Only specify this if you want to throttle the throughput so transactions can be sent slower
Sample usage
#!/bin/bash #without influxdb jmeter -n -t deploy-contract-public.jmx -Jurl=localhost -Jport=22000 -Jfrom=0xed9d02e382b34818e88b88a309c7fe71e65f419d -Jthreads=10 -Jseconds=60 #with influxdb jmeter -n -t deploy-contract-public.jmx -Jinfluxdburl=http://localhost:8086/write?db=telegraf -Jurl=localhost -Jport=22000 -Jfrom=0xed9d02e382b34818e88b88a309c7fe71e65f419d -Jthreads=10 -Jseconds=60
-
deploy-contract-private.jmx
test plan similarly fire transactions to deploy new privateSimpleStorage
contracts to the network with aprivateFor
recipient. The contracts are also being initialised with random value.Parameters are similar to the above, with an extra variable
privateFor
: Public key of the private recipient
Sample usage
#!/bin/bash #without influxdb jmeter -n -t deploy-contract-private.jmx -Jurl=localhost -Jport=22000 -Jfrom=0xed9d02e382b34818e88b88a309c7fe71e65f419d -JprivateFor=\"ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc=\" -Jthreads=10 -Jseconds=60 #with influxdb jmeter -n -t deploy-contract-private.jmx -Jinfluxdburl=http://localhost:8086/write?db=telegraf -Jurl=localhost -Jport=22000 -Jfrom=0xed9d02e382b34818e88b88a309c7fe71e65f419d -JprivateFor=\"ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc=\" -Jthreads=10 -Jseconds=60
-
update-contract-public.jmx
fire transactions to update the state of an existing contract in the network. The test plan will carry out the following step- Deploy a new public contract to the network
- Query the contract address after the contract is mined by calling
eth_getTransactionReceipt
with transaction hash retrieved from response of (i) - Extract the contract address from response of (ii) and send multiple transactions to the contract deployed with a different randomly generated value.
Sample usage
#!/bin/bash #without influxdb jmeter -n -t update-contract-public.jmx -Jurl=localhost -Jport=22000 -Jfrom=0xed9d02e382b34818e88b88a309c7fe71e65f419d -Jthreads=10 -Jseconds=60 #with influxdb jmeter -n -t update-contract-public.jmx -Jinfluxdburl=http://localhost:8086/write?db=telegraf -Jurl=localhost -Jport=22000 -Jfrom=0xed9d02e382b34818e88b88a309c7fe71e65f419d -Jthreads=10 -Jseconds=60
-
update-contract-private.jmx
fire transactions to update the state of an existing private contract. The test plan will carry out the follow steps:- Deploy a new private contract to the network (with the specified
privateFor
key) - Query the contract address after the contract is mined by calling
eth_getTransactionReceipt
with transaction hash retrieved from response of (i) - Extract the contract address from response of (ii) and send multiple transactions to the contract deployed with a different randomly generated value.
Sample usage
#!/bin/bash #without influxdb jmeter -n -t update-contract-private.jmx -Jurl=localhost -Jport=22000 -Jfrom=0xed9d02e382b34818e88b88a309c7fe71e65f419d -JprivateFor=\"ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc=\" -Jthreads=10 -Jseconds=60 #with influxdb jmeter -n -t update-contract-private.jmx -Jinfluxdburl=http://localhost:8086/write?db=telegraf -Jurl=localhost -Jport=22000 -Jfrom=0xed9d02e382b34818e88b88a309c7fe71e65f419d -JprivateFor=\"ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc=\" -Jthreads=10 -Jseconds=60
- Deploy a new private contract to the network (with the specified
1node
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||