Skip to content

Commit 4f6f71a

Browse files
committed
add gnosis profiles
1 parent 2edbd56 commit 4f6f71a

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

chainbench/profile/gnosis/archive.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
"""
2+
Gnosis Archive profile.
3+
"""
4+
5+
from locust import constant_pacing
6+
7+
from chainbench.user.protocol.evm import EvmUser
8+
9+
10+
class GnosisArchiveProfile(EvmUser):
11+
wait_time = constant_pacing(1)
12+
rpc_calls = {
13+
EvmUser.eth_block_number: 284,
14+
EvmUser.eth_call: 218,
15+
EvmUser.eth_get_block_by_number: 120,
16+
EvmUser.eth_syncing: 81,
17+
EvmUser.net_peer_count: 79,
18+
EvmUser.eth_get_transaction_receipt: 47,
19+
EvmUser.eth_get_logs: 26,
20+
EvmUser.eth_chain_id: 15,
21+
EvmUser.eth_get_code: 6,
22+
EvmUser.web3_client_version: 5,
23+
EvmUser.eth_fee_history: 5,
24+
EvmUser.eth_get_transaction_count: 2,
25+
EvmUser.eth_get_balance: 2,
26+
EvmUser.eth_get_block_by_hash: 2,
27+
EvmUser.eth_gas_price: 2,
28+
EvmUser.eth_estimate_gas: 1,
29+
EvmUser.eth_get_transaction_by_hash: 1,
30+
}
31+
32+
tasks = EvmUser.expand_tasks(rpc_calls)

chainbench/profile/gnosis/general.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""
2+
Gnosis profile.
3+
"""
4+
5+
from locust import constant_pacing
6+
7+
from chainbench.user.protocol.evm import EvmUser
8+
9+
10+
class GnosisProfile(EvmUser):
11+
wait_time = constant_pacing(1)
12+
rpc_calls = {
13+
EvmUser.eth_get_transaction_receipt: 1128,
14+
EvmUser.eth_get_transaction_by_hash: 439,
15+
EvmUser.eth_gas_price: 431,
16+
EvmUser.eth_get_transaction_count: 431,
17+
EvmUser.eth_get_balance: 429,
18+
EvmUser.eth_call: 322,
19+
EvmUser.eth_get_block_by_number: 315,
20+
EvmUser.eth_estimate_gas: 287,
21+
EvmUser.eth_get_code: 285,
22+
EvmUser.debug_trace_block_by_number: 191,
23+
EvmUser.net_version: 129,
24+
EvmUser.eth_get_logs: 28,
25+
EvmUser.eth_chain_id: 19,
26+
EvmUser.eth_block_number: 10,
27+
EvmUser.eth_max_priority_fee_per_gas: 1,
28+
EvmUser.eth_get_block_by_hash: 1,
29+
}
30+
31+
tasks = EvmUser.expand_tasks(rpc_calls)

0 commit comments

Comments
 (0)