Closed mmsqe closed 2 months ago
The changes introduce a new command-line argument, --num_max_workers
, across multiple files in the testground benchmark suite. This parameter allows users to specify the maximum number of worker threads for concurrent transaction processing. Modifications include updates to function signatures, internal logic adjustments, and the addition of a configuration parameter in the local.toml
file, enhancing the configurability and scalability of the benchmarking process.
File Path | Change Summary |
---|---|
testground/README.md |
Added --num_max_workers parameter to the command for running stateless test cases. |
testground/benchmark/benchmark/main.py |
Modified entrypoint function to include ctx.params.num_max_workers in generate_load call. |
testground/benchmark/benchmark/params.py |
Introduced num_max_workers property method to retrieve maximum workers from test_instance_params . |
testground/benchmark/benchmark/sendtx.py |
Updated generate_load function to accept num_max_workers , replacing hardcoded num_accounts . |
testground/benchmark/benchmark/stateless.py |
Added num_max_workers parameter to gen and patch_configs_local functions. |
testground/benchmark/benchmark/peer.py |
Modified patch_configs function to include config_patch and app_patch parameters. |
testground/benchmark/compositions/local.toml |
Introduced num_max_workers configuration parameter set to "3000". |
sequenceDiagram
participant User
participant CLI
participant Main
participant LoadGenerator
participant Params
User->>CLI: Run command with --num_max_workers
CLI->>Main: Pass num_max_workers
Main->>Params: Retrieve num_max_workers
Main->>LoadGenerator: Call generate_load with num_max_workers
LoadGenerator->>LoadGenerator: Execute load generation with specified workers
๐ "In the meadow, I hop and play,
New threads join the fray today!
With workers plenty, weโll send with glee,
Transactions flying, oh what a spree!
Configured well, we dance and cheer,
In our benchmark world, weโve nothing to fear!" ๐
testground/benchmark/benchmark/stateless.py
file, which is also altered in the main PR, specifically regarding the handling of configuration parameters.testground/benchmark/benchmark/stateless.py
50-50: Do not use mutable data structures for argument defaults Replace with `None`; initialize within function (B006) --- 51-51: Do not use mutable data structures for argument defaults Replace with `None`; initialize within function (B006)
testground/benchmark/benchmark/stateless.py (4)
`76-76`: **LGTM!** The changes to the `patch_configs_local` function call, passing the `config_patch` and `app_patch` arguments, are consistent with the updated function signature. --- `85-86`: **LGTM!** The changes to the `patch_configs_local` function call, passing the `config_patch` and `app_patch` arguments, are consistent with the updated function signature. --- `276-277`: **LGTM!** The changes to the `patch_configs_local` function signature, adding the `config_patch` and `app_patch` parameters, enhance the configurability of the function and align with the AI-generated summary. --- `282-282`: **LGTM!** The changes to the `patch_configs` function call, passing the `config_patch` and `app_patch` arguments, are consistent with the overall theme of enhancing configurability.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 15.24%. Comparing base (
7b402ef
) to head (013d2f5
). Report is 1 commits behind head on main.:exclamation: There is a different number of reports uploaded between BASE (7b402ef) and HEAD (013d2f5). Click for more details.
HEAD has 12 uploads less than BASE
| Flag | BASE (7b402ef) | HEAD (013d2f5) | |------|------|------| ||2|0| |integration_tests|20|10|
3 7 testplan-{index} 200 15 3000
what is the meaning of the fields?
3000
validator_count: 3
fullnode_count: 7
num_accounts: 200
num_txs: 15
num_max_workers: 3000
3000
validator_count: 3 fullnode_count: 7 num_accounts: 200 num_txs: 15 num_max_workers: 3000
what's the point of setting thread pool size larger than accounts, there's only one task for each account.
๐ฎ๐ป๐ฎ๐ป๐ฎ๐ป !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! ๐ฎ๐ป๐ฎ๐ป๐ฎ๐ป
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit
Summary by CodeRabbit
New Features
--num_max_workers
for enhanced control over concurrency during testing.num_max_workers
in the benchmark settings for improved transaction processing flexibility.gen
function for more granular control over node and application settings.Bug Fixes