Skip to content

Commit

Permalink
Add in some more remote load
Browse files Browse the repository at this point in the history
  • Loading branch information
moraygrieve committed Dec 10, 2024
1 parent f14c78c commit 7099ea9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stress_load_sepolia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: 'Run load and perf tests'
run: |
cd ${{ github.workspace }}/ten-test/tests
/usr/local/bin/pysys.py run -m ten.sepolia -i remote_load -c 4
/usr/local/bin/pysys.py run -m ten.sepolia -i remote_load -c 4 -XNUM_CLIENTS=5
- name: 'Upload testcase output'
uses: actions/upload-artifact@v4
Expand Down
12 changes: 6 additions & 6 deletions tests/ten/ten_rob_003/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@


class PySysTest(TenNetworkTest):
CLIENTS = 10 # number of transactors and subscribers
TRANSACTIONS = 250 # number of txs the transactors will perform
NUM_CLIENTS = 10 # number of transactors and subscribers
NUM_TRANSACTIONS = 250 # number of txs the transactors will perform

def execute(self):
# connect to network on the primary gateway and deploy contract
Expand All @@ -27,11 +27,11 @@ def execute(self):
limits.append(emitter.contract.functions.emitStructEvent(1, rstr).estimate_gas(params))
limits.append(emitter.contract.functions.emitMappingEvent(1, [account.address], [200]).estimate_gas(params))
gas_limit = max(limits)
funds_needed = 1.1 * self.TRANSACTIONS * (gas_price * gas_limit)
funds_needed = 1.1 * self.NUM_TRANSACTIONS * (gas_price * gas_limit)

# setup the transactors and run the subscribers
clients = []
for id in range(0, self.CLIENTS):
for id in range(0, self.NUM_CLIENTS):
pk, account, network = self.setup_transactor(funds_needed)
clients.append((id, pk, account, network))
self.run_subscriber(network, emitter, account, id)
Expand Down Expand Up @@ -66,7 +66,7 @@ def run_transactor(self, id, emitter, pk, network, gas_limit):
args.extend(['--pk', pk])
args.extend(['--contract_address', '%s' % emitter.address])
args.extend(['--contract_abi', '%s' % emitter.abi_path])
args.extend(['--transactions', '%d' % self.TRANSACTIONS])
args.extend(['--transactions', '%d' % self.NUM_TRANSACTIONS])
args.extend(['--id', '%d' % id])
args.extend(['--gas_limit', '%d' % gas_limit])
self.run_python(script, stdout, stderr, args, state=FOREGROUND, timeout=300)
Expand Down Expand Up @@ -112,7 +112,7 @@ def run_poller_all(self, network, emitter):
args.extend(['--network_ws', network.connection_url(web_socket=True)])
args.extend(['--contract_address', '%s' % emitter.address])
args.extend(['--contract_abi', '%s' % emitter.abi_path])
args.extend(['--id_range', '%d' % self.CLIENTS])
args.extend(['--id_range', '%d' % self.NUM_CLIENTS])
self.run_javascript(script, stdout, stderr, args)

def rand_str(self):
Expand Down

0 comments on commit 7099ea9

Please sign in to comment.