Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PH] Feature performance harness stage 2 development #473

Merged
merged 242 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from 229 commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
9986399
Add support for configuring number of worker threads in controller th…
oschwaldp-oci Nov 15, 2022
138fb0e
Add support for configuring number of worker threads in net_plugin th…
oschwaldp-oci Nov 15, 2022
2afac00
Add support for configuring number of worker threads in producer thre…
oschwaldp-oci Nov 15, 2022
9f59b5e
Merge pull request #469 from AntelopeIO/ph-thread-configs
oschwaldp-oci Nov 16, 2022
8fd065c
Update docs for new arguments.
oschwaldp-oci Nov 16, 2022
b7bc0fe
Merge pull request #475 from AntelopeIO/ph-thread-configs
oschwaldp-oci Nov 16, 2022
4dd551f
Rename to simplify and shorten plugin argument classes.
oschwaldp-oci Nov 16, 2022
e3e688a
Refactor to use __str__ function override.
oschwaldp-oci Nov 16, 2022
f852de1
Add argument to configure --database-map-mode.
oschwaldp-oci Nov 16, 2022
20f7ccf
Update docs for new argument
oschwaldp-oci Nov 16, 2022
90a1cbd
Add cpu count to top level report.
oschwaldp-oci Nov 17, 2022
f7c008a
Merge pull request #481 from AntelopeIO/ph-db-map-mode
oschwaldp-oci Nov 17, 2022
841011b
Merge branch 'feature_performance_harness' into feature_performance_h…
oschwaldp-oci Nov 17, 2022
bda146d
Add target tps number to test log dir name for ease of locating speci…
oschwaldp-oci Nov 17, 2022
f09a1be
Merge branch 'feature_performance_harness' into feature_performance_h…
oschwaldp-oci Nov 17, 2022
f7a486f
Merge branch 'feature_performance_harness_stage_2' into ph-log-dir-ad…
oschwaldp-oci Nov 17, 2022
3fe37f3
Merge pull request #484 from AntelopeIO/ph-log-dir-add-tps-target
oschwaldp-oci Nov 18, 2022
d35b65c
Rename to PerformanceTestBasic to better align with script names.
oschwaldp-oci Nov 18, 2022
d4b31f3
Factor out test params into PtbConfig and LoggingConfig objects.
oschwaldp-oci Nov 18, 2022
22b0118
Factor PerformanceTest out into its own class.
oschwaldp-oci Nov 21, 2022
7ba252b
Add options to calculate recommended producer, chain, and net worker …
oschwaldp-oci Nov 23, 2022
92fa92a
Update defaults for producer threads to 6 and chain threads to 3 base…
oschwaldp-oci Nov 23, 2022
2ca2eb9
Fix typo.
oschwaldp-oci Nov 23, 2022
1db0e6c
Fix check for thread calc being 'none'
oschwaldp-oci Nov 28, 2022
84b1179
Fix reference before assignment error on results objects when not con…
oschwaldp-oci Nov 28, 2022
ed975c6
Make use of ArgumentParser parents and groups.
oschwaldp-oci Nov 29, 2022
ee17955
Don't print Application Specific Arguments group if there are none.
oschwaldp-oci Nov 29, 2022
b6b6bcf
Clarify TPS Test Config is part of Performance Harness.
oschwaldp-oci Nov 29, 2022
bd4a525
Fix performance_test_basic.py parser.
oschwaldp-oci Nov 29, 2022
f1d78e2
Merge branch 'feature_performance_harness' into ph2-merge-feature-br
oschwaldp-oci Nov 29, 2022
8bfa573
Merge pull request #520 from AntelopeIO/ph2-merge-feature-br
oschwaldp-oci Nov 29, 2022
0d5980d
Use Python introspection to simplify.
oschwaldp-oci Nov 30, 2022
d291e17
Use encoder to handle datetime and None type conversions for reporting.
oschwaldp-oci Nov 30, 2022
33b94ba
Remove redundant calls to close when using with statement.
oschwaldp-oci Nov 30, 2022
c175d6b
Resuse encoder from log_reader.
oschwaldp-oci Nov 30, 2022
dc76de1
Merge pull request #510 from AntelopeIO/ph-thread-count-tests
oschwaldp-oci Nov 30, 2022
118a2a0
Merge pull request #518 from AntelopeIO/ph-argparse
oschwaldp-oci Nov 30, 2022
811817f
Merge branch 'feature_performance_harness' into feature_performance_h…
oschwaldp-oci Dec 1, 2022
7861f77
Merge branch 'feature_performance_harness' into feature_performance_h…
oschwaldp-oci Dec 1, 2022
cf40972
Provide *PluginArgs dataclasses to capture and validate nodeos config…
oschwaldp-oci Dec 6, 2022
23aea60
Fixup some of the config options.
oschwaldp-oci Dec 6, 2022
8655e4d
Script that generates *PluginArgs.py dataclass files from nodeos --he…
oschwaldp-oci Dec 6, 2022
6936b41
Fixup invalid syntax error.
oschwaldp-oci Dec 7, 2022
7dc7133
Fixup generator for proper quote detection and selection.
oschwaldp-oci Dec 7, 2022
d23ae4c
Merge branch 'feature_performance_harness' into feature_performance_h…
oschwaldp-oci Dec 7, 2022
0cd997f
Provide BasePluginArgs base class.
oschwaldp-oci Dec 7, 2022
d1d717d
Remove threads setter function and use setattr instead.
oschwaldp-oci Dec 7, 2022
7703c6e
Remove cruft.
oschwaldp-oci Dec 7, 2022
cdb1342
Create NodeosPluginArgs python package
oschwaldp-oci Dec 7, 2022
bea0ec0
Fix imports.
oschwaldp-oci Dec 7, 2022
cc6879c
Fix module name.
oschwaldp-oci Dec 7, 2022
52b7903
Remove redundant paths in CMake files.
oschwaldp-oci Dec 7, 2022
792a0f8
Add purpose and limitations statement to generation script.
oschwaldp-oci Dec 7, 2022
2e4495e
Add suggestion to regen classes if test fails due to updated nodeos c…
oschwaldp-oci Dec 7, 2022
45c6376
Fix typos and formatting.
jgiszczak Dec 7, 2022
54b1c4f
Merge pull request #546 from AntelopeIO/ph-nodeos-defaults
oschwaldp-oci Dec 7, 2022
e095f2b
replace use of os.path with pathlib's Path and PurePath
ClaytonCalabrese Dec 13, 2022
3934299
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Dec 20, 2022
acfdfc5
convert additional string paths to pathLike objects
ClaytonCalabrese Dec 20, 2022
bf1126d
fix some problems with pathLike changes
ClaytonCalabrese Dec 20, 2022
339d1c8
convert log reader tests to use pathlike objects)
ClaytonCalabrese Dec 21, 2022
54af028
remove unused import
ClaytonCalabrese Dec 21, 2022
17ada31
remove more unused imports
ClaytonCalabrese Dec 21, 2022
4a53c71
replace repeated path calls with concatonated strings using / operato…
ClaytonCalabrese Dec 23, 2022
99dd39d
more path to string changes
ClaytonCalabrese Dec 23, 2022
1b1a191
more changes to using specified contracts in performance tests.
ClaytonCalabrese Dec 24, 2022
099bbe4
merge from main
ClaytonCalabrese Jan 2, 2023
dc1575b
resolve failures for 2.0 following merge.
ClaytonCalabrese Jan 2, 2023
bbfe01e
update NodeosPluginArgs to match addition of --state-dir
ClaytonCalabrese Jan 3, 2023
bd1bd7d
Merge branch 'main' into ph_merge_main_phase2_1_2
ClaytonCalabrese Jan 3, 2023
3fd598b
Merge pull request #611 from AntelopeIO/ph_merge_main_phase2_1_2
ClaytonCalabrese Jan 3, 2023
5cc2425
rework custom contract activation in performance harness
ClaytonCalabrese Jan 4, 2023
6dd154b
Merge pull request #571 from AntelopeIO/performance_harness_replace_o…
ClaytonCalabrese Jan 4, 2023
a8ea37a
remove unnecessary new lines
ClaytonCalabrese Jan 4, 2023
7ab1586
merge from feature branch to resolve conflicts
ClaytonCalabrese Jan 4, 2023
fba333b
report forks and forked blocks in performance harness
ClaytonCalabrese Jan 5, 2023
186a0b0
revert unintended change made to get logs for testing.
ClaytonCalabrese Jan 5, 2023
15061f9
merge from feature branch
ClaytonCalabrese Jan 5, 2023
22b60a3
add a +1 to how many forked blocks are logged
ClaytonCalabrese Jan 5, 2023
95ebafb
Merge pull request #618 from AntelopeIO/performance_harness_log_forks
ClaytonCalabrese Jan 9, 2023
58fed8c
Trx Generator config support for JSON transaction description
oschwaldp-oci Jan 9, 2023
00a552f
Add action_name, action_data, and abi_file argument support.
oschwaldp-oci Jan 9, 2023
eb8337a
use explicit names on constructor for specified contract
ClaytonCalabrese Jan 10, 2023
060be86
log production windows, dropped blocks, and dropped transactions in p…
ClaytonCalabrese Jan 11, 2023
24ce5d9
merge and resolve conflicts from feature branch
ClaytonCalabrese Jan 11, 2023
26f0b5a
change production window size to constant
ClaytonCalabrese Jan 11, 2023
c26432e
more explicit constructor names
ClaytonCalabrese Jan 11, 2023
4817492
Rename for clarity as this is not a string.
oschwaldp-oci Jan 12, 2023
e290f59
Refactor user defined trx data into easily modifiable dataclass UserT…
oschwaldp-oci Jan 12, 2023
03750c9
Refactor common transaction generator code into base class.
oschwaldp-oci Jan 12, 2023
777d9d3
Remove UserTrxData in favor of loading user data from json file.
oschwaldp-oci Jan 12, 2023
d867824
Replace cout in favor of xlog statements.
oschwaldp-oci Jan 12, 2023
92870e1
Merge pull request #598 from AntelopeIO/performance_harness_specifiy_…
ClaytonCalabrese Jan 12, 2023
08746f0
Merge branch 'feature_performance_harness_stage_2' into ph-trx-gen-json
oschwaldp-oci Jan 12, 2023
02163a4
Merge pull request #626 from AntelopeIO/ph-trx-gen-json
oschwaldp-oci Jan 12, 2023
3775f50
undo unintentional default change. Inform users when adjusting lbto a…
ClaytonCalabrese Jan 12, 2023
18d654f
commit print statement that was unsaved in past commit
ClaytonCalabrese Jan 12, 2023
bda0d82
count first and last window as complete windows if containing 12 bloc…
ClaytonCalabrese Jan 12, 2023
be375bf
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Jan 13, 2023
1334957
Fixup from Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Jan 13, 2023
0743686
Another fixup from Merge branch 'main' into feature_performance_harne…
oschwaldp-oci Jan 13, 2023
a70daf9
remove sorted keys and regenerate report for readme to reduce diff
ClaytonCalabrese Jan 13, 2023
f72b6fd
redo generated report using single producer
ClaytonCalabrese Jan 13, 2023
031f5fe
merge from feature branch and resolve conflicts
ClaytonCalabrese Jan 13, 2023
da7dff2
refactor calcProductionWindows
ClaytonCalabrese Jan 13, 2023
4ca1528
Merge pull request #633 from AntelopeIO/performance_harness_dropped_b…
ClaytonCalabrese Jan 16, 2023
9af6e90
seperate out new csv file containing data and rework as necessary
ClaytonCalabrese Jan 18, 2023
031f595
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Jan 19, 2023
8f32316
add header to csv and filter out ungenerated transactions
ClaytonCalabrese Jan 24, 2023
5f1770b
rename csv
ClaytonCalabrese Jan 26, 2023
5add73c
change from .txt to .csv
ClaytonCalabrese Jan 26, 2023
de7c7b0
change csv variable names to something more proper
ClaytonCalabrese Jan 27, 2023
ac1c5db
Merge pull request #647 from AntelopeIO/performance_harness_csv
ClaytonCalabrese Jan 27, 2023
96930a1
Rename in prep to support additional trx desc files.
oschwaldp-oci Jan 30, 2023
a4d6ecc
Rename for generalization, not strictly for transfers.
oschwaldp-oci Jan 31, 2023
cfe8346
Add way to specify auth acct when using json trx description.
oschwaldp-oci Feb 1, 2023
caa8f41
Refactoring. Moving functions into classes.
oschwaldp-oci Feb 1, 2023
f52beda
Fix compiler warnings in tests.
oschwaldp-oci Feb 1, 2023
b35c3d6
Add ability to configure log level for cluster via cli arg.
oschwaldp-oci Feb 2, 2023
d8d9fa3
Expand transaction generator to support new account trx
oschwaldp-oci Feb 8, 2023
df12ef4
Fix argument names.
oschwaldp-oci Feb 9, 2023
9a8d792
Control test-duration-sec for these tests.
oschwaldp-oci Feb 9, 2023
5082223
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Feb 9, 2023
3022c7c
Fix validate_nodeos_plugin_args test by updating NetPlugingArgs default.
oschwaldp-oci Feb 9, 2023
7d250f6
Merge branch 'feature_performance_harness_stage_2' into ph-gen-newacc…
oschwaldp-oci Feb 9, 2023
68fe107
Apply nonparallelizable_tests flag to new tests.
oschwaldp-oci Feb 9, 2023
310e6b8
Make actions data and auths const.
oschwaldp-oci Feb 9, 2023
299c9e9
Fix Cluster's arguments for TransactionGeneratorsLauncher.
oschwaldp-oci Feb 9, 2023
f6f56e5
Fix logic in log_transactions.
oschwaldp-oci Feb 9, 2023
938d4ab
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Feb 9, 2023
3c6bb07
Merge branch 'feature_performance_harness_stage_2' into ph-gen-newacc…
oschwaldp-oci Feb 9, 2023
0dc7b3a
Rename id to generator_id to be more specific.
oschwaldp-oci Feb 10, 2023
1ad0888
Address some peer review comments.
oschwaldp-oci Feb 10, 2023
24e376c
Additional peer review comments being addressed.
oschwaldp-oci Feb 10, 2023
1286823
Address peer review comment. Virtual destructor added.
oschwaldp-oci Feb 10, 2023
56863d0
Address additional peer review comments.
oschwaldp-oci Feb 10, 2023
1ca46a8
add eosiomechanics cpu run to performance test basic
ClaytonCalabrese Feb 11, 2023
dd4fb91
Add commentary and unit tests for account name generator.
oschwaldp-oci Feb 13, 2023
77ba8ea
Fix typo in argument.
oschwaldp-oci Feb 13, 2023
4384455
Make private helper to protect usage.
oschwaldp-oci Feb 13, 2023
66fc7dd
Correct the default priv keys to be valid key format.
oschwaldp-oci Feb 13, 2023
239fa1f
Addressing peer review comments.
oschwaldp-oci Feb 13, 2023
f25de1b
Addressing peer review comments.
oschwaldp-oci Feb 13, 2023
8a1fecd
Merge pull request #702 from AntelopeIO/ph-gen-newaccounts
oschwaldp-oci Feb 13, 2023
d35b2f9
merge from dev branch
ClaytonCalabrese Feb 13, 2023
06c418e
merge from feature branch
ClaytonCalabrese Feb 15, 2023
d00908e
add variable to be saved in report which captures arg string in full
ClaytonCalabrese Feb 15, 2023
1b77051
improve reporting for command line in performance tests. Replace READ…
ClaytonCalabrese Feb 15, 2023
94d4b4b
add missing cpuTrxData.json file
ClaytonCalabrese Feb 16, 2023
96ae1ec
revert some no longer necessary changes following merge and resolve t…
ClaytonCalabrese Feb 16, 2023
724ba6c
readd test-duration-sec to cpu performance test, remove lingering co…
ClaytonCalabrese Feb 16, 2023
5a67397
reduce size of specifiedContract through use of .account
ClaytonCalabrese Feb 16, 2023
e27ebfa
revert a number of inadvertant whitespace changes due to removed code…
ClaytonCalabrese Feb 17, 2023
270ea09
improve visibility of TypeErrors and still output JSON when one occurs
ClaytonCalabrese Feb 17, 2023
726a033
rerun test and update readme
ClaytonCalabrese Feb 18, 2023
8f75c30
add ram performance test. Rework how keys are put into contract accou…
ClaytonCalabrese Feb 20, 2023
6e5cb4a
Merge pull request #720 from AntelopeIO/performance_harness_capture_a…
ClaytonCalabrese Feb 21, 2023
074471b
address PR comment to make contracts folder consistent.
ClaytonCalabrese Feb 21, 2023
1cf32d6
give ability to cleanup transaction generator in TestHelper shutdown
ClaytonCalabrese Feb 21, 2023
a2ee13a
rearrange shutdown arguments to accomodate the 20 or so tests using …
ClaytonCalabrese Feb 22, 2023
fd4cdbd
Update README for new command line arguments to Performance Harness s…
oschwaldp-oci Feb 22, 2023
97ed6b6
Update test report examples in README.
oschwaldp-oci Feb 22, 2023
3fe0fdf
Update docs for trx_generator README.
oschwaldp-oci Feb 22, 2023
2fd6ad6
Unwind shutdown changes as cluster killall will handle the transactio…
ClaytonCalabrese Feb 22, 2023
1935103
remove shutdown change from nodeos_startup_catchup
ClaytonCalabrese Feb 22, 2023
c15ed53
remove unused import
ClaytonCalabrese Feb 22, 2023
5980ed3
Merge pull request #731 from AntelopeIO/performance_harness_shutdown_…
ClaytonCalabrese Feb 22, 2023
3f191a9
update transaction datafiles to match new eosio.mechanics directory l…
ClaytonCalabrese Feb 22, 2023
4f90bf6
Update log directory structure example.
oschwaldp-oci Feb 22, 2023
fd0c702
remove unavailable options from README for performance test
ClaytonCalabrese Feb 22, 2023
97a8d12
merge from feature branch
ClaytonCalabrese Feb 22, 2023
b1ce271
re-report the readme report due to changes, and update performance te…
ClaytonCalabrese Feb 22, 2023
db73142
Expose a number of nodeos options via the CLI in performance_test_bas…
ClaytonCalabrese Feb 23, 2023
8a0adc4
Merge pull request #713 from AntelopeIO/performance_harness_eos_mecha…
ClaytonCalabrese Feb 23, 2023
2952699
Merge branch 'feature_performance_harness_stage_2' into performance_h…
ClaytonCalabrese Feb 23, 2023
dcd8bc6
Restore accidentally removed config option. Added new option and upda…
ClaytonCalabrese Feb 23, 2023
4818119
fix some README issues in performance test
ClaytonCalabrese Feb 23, 2023
181fe40
Merge branch 'main' into feature_performance_harness_stage_2
ClaytonCalabrese Feb 24, 2023
a13f48b
merge from main and rerun generate_nodeos_plugin_args
ClaytonCalabrese Feb 24, 2023
93f7a50
add a sanity check for number of transactions scraped from trx gen
ClaytonCalabrese Feb 27, 2023
6dfb66e
resolve test failure for ram and cpu performance tests due to id coll…
ClaytonCalabrese Feb 27, 2023
1ce9036
change enable args in performance_test_basic to be store_true instead…
ClaytonCalabrese Feb 27, 2023
2940d5a
Updates per peer review.
oschwaldp-oci Feb 28, 2023
62126c6
Merge pull request #757 from AntelopeIO/performance_harness_resolve_d…
ClaytonCalabrese Feb 28, 2023
cdc00a2
Merge branch 'feature_performance_harness_stage_2' into ph2-update-docs
oschwaldp-oci Feb 28, 2023
0781972
Update reports in readme.
oschwaldp-oci Feb 28, 2023
a5adbda
Merge pull request #734 from AntelopeIO/ph2-update-docs
oschwaldp-oci Feb 28, 2023
0d30973
rename eos-vm-oc-enable in performance test to represent it only affe…
ClaytonCalabrese Feb 28, 2023
0fbdbfa
merge from dev branch
ClaytonCalabrese Feb 28, 2023
7075447
add fix for duplicate transaction in transaction generators when resi…
ClaytonCalabrese Feb 28, 2023
e6b2a4e
Merge pull request #740 from AntelopeIO/performance_harness_nodeos_co…
ClaytonCalabrese Mar 1, 2023
5531d0e
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Mar 1, 2023
48022c9
Update ChainPluginArgs to capture arguments added to chain plugin.
oschwaldp-oci Mar 1, 2023
ec5db24
Update the min threads to start at when calculating number of threads…
oschwaldp-oci Mar 1, 2023
bad5a9b
expose --user-trx-data-file to performance test
ClaytonCalabrese Mar 1, 2023
ddd6486
remove unneeded arg in performPtbBinarySearch
ClaytonCalabrese Mar 1, 2023
b152475
also fix linearsearch test case for performance test.
ClaytonCalabrese Mar 1, 2023
de7274b
Merge pull request #761 from AntelopeIO/ph-update-calc-threads-min
oschwaldp-oci Mar 1, 2023
08bd7b5
Merge pull request #762 from AntelopeIO/performance_harness_performan…
ClaytonCalabrese Mar 1, 2023
576ba16
Handle excpetions occurring during runTest.
oschwaldp-oci Mar 2, 2023
ce4f840
Merge pull request #766 from AntelopeIO/ph-handle-exception
oschwaldp-oci Mar 2, 2023
9de88d4
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Mar 2, 2023
85eecb0
Update ProducerPluginArgs for new arguments introduced on main.
oschwaldp-oci Mar 2, 2023
9cf5ffe
set cmake test runs of performance_test_basic to a lower value for ch…
ClaytonCalabrese Mar 2, 2023
397293b
Merge pull request #769 from AntelopeIO/performance_harness_reduce_te…
ClaytonCalabrese Mar 2, 2023
3f007ba
fix introduced compatibility issues for nodeos 2.0 in performance tests
ClaytonCalabrese Mar 2, 2023
480eb31
simplify version check for resource monitor plugin constructor in per…
ClaytonCalabrese Mar 2, 2023
d745753
Merge pull request #771 from AntelopeIO/performance_harness_fix_2_0_c…
ClaytonCalabrese Mar 2, 2023
505b5d8
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Mar 3, 2023
1e36c51
Update StateHistoryPluginArgs for new arguments introduced on main.
oschwaldp-oci Mar 3, 2023
e6bfc9e
Add new section to log_reader_tests to ensure 2.0 compatibility doesn…
ClaytonCalabrese Mar 3, 2023
cfeaa64
refactor log_reader use of nodeos version so it isn't recalculated mu…
ClaytonCalabrese Mar 3, 2023
a631088
pass along nodeos version in performance test rather than calculating…
ClaytonCalabrese Mar 3, 2023
60299d5
rename file passed into log_reader_tests to a proper .gz suffix
ClaytonCalabrese Mar 3, 2023
0a5ea49
Merge pull request #778 from AntelopeIO/performance_harness_update_lo…
ClaytonCalabrese Mar 6, 2023
602e9ee
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Mar 7, 2023
5d39885
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Mar 7, 2023
71a155b
Updates for changes in nodeos plugin args from merge from main.
oschwaldp-oci Mar 7, 2023
fe8e3df
Clean up argument handling per peer review suggestions.
oschwaldp-oci Mar 7, 2023
bbf4a2e
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Mar 7, 2023
23670d0
Reintroduce stop-on-trx-failed argument.
oschwaldp-oci Mar 7, 2023
eed59be
Work to coalesce arguments into config objects.
oschwaldp-oci Mar 8, 2023
2d31597
Put back in blank line so list will render properly.
oschwaldp-oci Mar 8, 2023
3cd1b36
Addressing peer review comments
oschwaldp-oci Mar 8, 2023
778ff30
Cleaning up using namespace statements and namespace qualifiers.
oschwaldp-oci Mar 8, 2023
173fff9
Fix braces.
oschwaldp-oci Mar 9, 2023
bafd7dd
Address peer review comments.
oschwaldp-oci Mar 9, 2023
72451aa
Address peer review comments.
oschwaldp-oci Mar 9, 2023
c6717c4
Peer review comment.
oschwaldp-oci Mar 9, 2023
045db81
Addressing peer review comments.
oschwaldp-oci Mar 9, 2023
93fc50a
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Mar 9, 2023
1c612e8
Update ProducerPluginArgs for newly added arguments.
oschwaldp-oci Mar 9, 2023
5008148
Addressing peer review comments.
oschwaldp-oci Mar 9, 2023
5ec692a
Fixup documentation for missing arguments.
oschwaldp-oci Mar 9, 2023
6ba406f
Address peer review comments.
oschwaldp-oci Mar 9, 2023
df957cd
Addressing peer review comment to remove unused code.
oschwaldp-oci Mar 9, 2023
9063dd8
Addressing peer review comments.
oschwaldp-oci Mar 9, 2023
7ee35bb
Generate *PluginArgs.py files directly.
oschwaldp-oci Mar 9, 2023
93f52ea
Don't require these find packages, which are already being done highe…
oschwaldp-oci Mar 9, 2023
a24b05c
Switch to support older versions of python.
oschwaldp-oci Mar 9, 2023
a9aea20
Switch to support older versions of python.
oschwaldp-oci Mar 10, 2023
da92673
Merge branch 'main' into feature_performance_harness_stage_2
oschwaldp-oci Mar 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 43 additions & 28 deletions tests/TestHarness/Cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, walletd=False, localCluster=True, host="localhost", port=8888
defproduceraPrvtKey: Defproducera account private key
defproducerbPrvtKey: Defproducerb account private key
"""
self.accounts={}
self.accounts=[]
self.nodes=[]
self.unstartedNodes=[]
self.localCluster=localCluster
Expand Down Expand Up @@ -257,11 +257,18 @@ def launch(self, pnodes=1, unstartedNodes=0, totalNodes=1, prodCount=1, topo="me
cmdArr=cmd.split()
if self.staging:
cmdArr.append("--nogen")

nodeosArgs="--max-transaction-time -1 --abi-serializer-max-time-ms 990000 --p2p-max-nodes-per-host %d --max-clients %d" % (maximumP2pPerHost, maximumClients)
nodeosArgs=""
if "--max-transaction-time" not in extraNodeosArgs:
nodeosArgs += " --max-transaction-time -1"
if "--abi-serializer-max-time-ms" not in extraNodeosArgs:
nodeosArgs += " --abi-serializer-max-time-ms 990000"
if "--p2p-max-nodes-per-host" not in extraNodeosArgs:
nodeosArgs += f" --p2p-max-nodes-per-host {maximumP2pPerHost}"
if "--max-clients" not in extraNodeosArgs:
nodeosArgs += f" --max-clients {maximumClients}"
if not self.walletd:
nodeosArgs += " --plugin eosio::wallet_api_plugin"
if Utils.Debug:
if Utils.Debug and "--contracts-console" not in extraNodeosArgs:
nodeosArgs += " --contracts-console"
if PFSetupPolicy.hasPreactivateFeature(pfSetupPolicy):
nodeosArgs += " --plugin eosio::producer_api_plugin"
Expand Down Expand Up @@ -705,7 +712,9 @@ def createAccountKeys(count):

# create account keys and import into wallet. Wallet initialization will be user responsibility
# also imports defproducera and defproducerb accounts
def populateWallet(self, accountsCount, wallet):
def populateWallet(self, accountsCount, wallet, accountNames: list=None, createProducerAccounts: bool=True):
if accountsCount == 0 and len(accountNames) == 0:
return True
huangminghuang marked this conversation as resolved.
Show resolved Hide resolved
if self.walletMgr is None:
Utils.Print("ERROR: WalletMgr hasn't been initialized.")
return False
Expand All @@ -718,23 +727,28 @@ def populateWallet(self, accountsCount, wallet):
Utils.Print("Account keys creation failed.")
return False

Utils.Print("Importing keys for account %s into wallet %s." % (self.defproduceraAccount.name, wallet.name))
if not self.walletMgr.importKey(self.defproduceraAccount, wallet):
Utils.Print("ERROR: Failed to import key for account %s" % (self.defproduceraAccount.name))
return False
if createProducerAccounts:
Utils.Print("Importing keys for account %s into wallet %s." % (self.defproduceraAccount.name, wallet.name))
if not self.walletMgr.importKey(self.defproduceraAccount, wallet):
Utils.Print("ERROR: Failed to import key for account %s" % (self.defproduceraAccount.name))
return False

Utils.Print("Importing keys for account %s into wallet %s." % (self.defproducerbAccount.name, wallet.name))
if not self.walletMgr.importKey(self.defproducerbAccount, wallet):
Utils.Print("ERROR: Failed to import key for account %s" % (self.defproducerbAccount.name))
return False
Utils.Print("Importing keys for account %s into wallet %s." % (self.defproducerbAccount.name, wallet.name))
if not self.walletMgr.importKey(self.defproducerbAccount, wallet):
Utils.Print("ERROR: Failed to import key for account %s" % (self.defproducerbAccount.name))
return False

if accountNames is not None:
for idx, name in enumerate(accountNames):
huangminghuang marked this conversation as resolved.
Show resolved Hide resolved
accounts[idx].name = name

for account in accounts:
Utils.Print("Importing keys for account %s into wallet %s." % (account.name, wallet.name))
if not self.walletMgr.importKey(account, wallet):
Utils.Print("ERROR: Failed to import key for account %s" % (account.name))
return False
self.accounts.append(account)

self.accounts=accounts
return True

def getNodeP2pPort(self, nodeId: int):
Expand Down Expand Up @@ -1587,22 +1601,22 @@ def cleanup(self):
for f in self.filesToCleanup:
os.remove(f)


# Create accounts and validates that the last transaction is received on root node
huangminghuang marked this conversation as resolved.
Show resolved Hide resolved
def createAccounts(self, creator, waitForTransBlock=True, stakedDeposit=1000, validationNodeIndex=0):
if self.accounts is None:
return True

transId=None
for account in self.accounts:
if Utils.Debug: Utils.Print("Create account %s." % (account.name))
if Utils.Debug: Utils.Print("Validation node %s" % validationNodeIndex)
trans=self.createAccountAndVerify(account, creator, stakedDeposit, validationNodeIndex=validationNodeIndex)
if trans is None:
Utils.Print("ERROR: Failed to create account %s." % (account.name))
return False
if Utils.Debug: Utils.Print("Account %s created." % (account.name))
transId=Node.getTransId(trans)
ret = self.biosNode.getEosAccount(account.name)
if ret is None:
if Utils.Debug: Utils.Print("Create account %s." % (account.name))
if Utils.Debug: Utils.Print("Validation node %s" % validationNodeIndex)
trans=self.createAccountAndVerify(account, creator, stakedDeposit, validationNodeIndex=validationNodeIndex)
if trans is None:
Utils.Print("ERROR: Failed to create account %s." % (account.name))
return False
if Utils.Debug: Utils.Print("Account %s created." % (account.name))
transId=Node.getTransId(trans)

if waitForTransBlock and transId is not None:
node=self.nodes[validationNodeIndex]
Expand Down Expand Up @@ -1760,7 +1774,7 @@ def stripValues(lowestMaxes,greaterThan):

def launchTrxGenerators(self, contractOwnerAcctName: str, acctNamesList: list, acctPrivKeysList: list,
nodeId: int=0, tpsPerGenerator: int=10, numGenerators: int=1, durationSec: int=60,
waitToComplete:bool=False):
waitToComplete:bool=False, abiFile=None, actionsData=None, actionsAuths=None):
Utils.Print("Configure txn generators")
node=self.getNode(nodeId)
p2pListenPort = self.getNodeP2pPort(nodeId)
Expand All @@ -1775,9 +1789,10 @@ def launchTrxGenerators(self, contractOwnerAcctName: str, acctNamesList: list, a

tpsTrxGensConfig = TpsTrxGensConfig(targetTps=targetTps, tpsLimitPerGenerator=tpsLimitPerGenerator)
self.trxGenLauncher = TransactionGeneratorsLauncher(chainId=chainId, lastIrreversibleBlockId=lib_id,
handlerAcct=contractOwnerAcctName, accts=','.join(map(str, acctNamesList)),
privateKeys=','.join(map(str, acctPrivKeysList)), trxGenDurationSec=durationSec,
logDir=Utils.DataDir, peerEndpoint=self.host, port=p2pListenPort, tpsTrxGensConfig=tpsTrxGensConfig)
contractOwnerAccount=contractOwnerAcctName, accts=','.join(map(str, acctNamesList)),
privateKeys=','.join(map(str, acctPrivKeysList)), trxGenDurationSec=durationSec, logDir=Utils.DataDir,
abiFile=abiFile, actionsData=actionsData, actionsAuths=actionsAuths,
peerEndpoint=self.host, port=p2pListenPort, tpsTrxGensConfig=tpsTrxGensConfig)

Utils.Print("Launch txn generators and start generating/sending transactions")
self.trxGenLauncher.launch(waitToComplete=waitToComplete)
Expand Down
14 changes: 7 additions & 7 deletions tests/TestHarness/Node.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,18 +518,18 @@ def checkBlockForTransactions(self, transIds, blockNum):
return transIds

def waitForTransactionsInBlockRange(self, transIds, startBlock=2, maxFutureBlocks=0):
lastBlockProcessed = startBlock
overallFinalBlock = startBlock + maxFutureBlocks
nextBlockToProcess = startBlock
overallEndBlock = startBlock + maxFutureBlocks
while len(transIds) > 0:
currentLoopEndBlock = self.getHeadBlockNum()
if currentLoopEndBlock > overallFinalBlock:
currentLoopEndBlock = overallFinalBlock
for blockNum in range(currentLoopEndBlock, lastBlockProcessed - 1, -1):
if currentLoopEndBlock > overallEndBlock:
currentLoopEndBlock = overallEndBlock
for blockNum in range(nextBlockToProcess, currentLoopEndBlock + 1):
transIds = self.checkBlockForTransactions(transIds, blockNum)
if len(transIds) == 0:
return transIds
lastBlockProcessed = currentLoopEndBlock
if currentLoopEndBlock == overallFinalBlock:
nextBlockToProcess = currentLoopEndBlock + 1
if currentLoopEndBlock == overallEndBlock:
Utils.Print("ERROR: Transactions were missing upon expiration of waitOnblockTransactions")
break
self.waitForHeadToAdvance()
Expand Down
82 changes: 48 additions & 34 deletions tests/TestHarness/TestHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,87 +37,101 @@ class TestHelper(object):
@staticmethod
# pylint: disable=too-many-branches
# pylint: disable=too-many-statements
def parse_args(includeArgs, applicationSpecificArgs=AppArgs()):
def createArgumentParser(includeArgs, applicationSpecificArgs=AppArgs()) -> argparse.ArgumentParser:
"""Accepts set of arguments, builds argument parser and returns parse_args() output."""
assert(includeArgs)
assert(isinstance(includeArgs, set))
assert(isinstance(applicationSpecificArgs, AppArgs))

parser = argparse.ArgumentParser(add_help=False, formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-?', action='help', default=argparse.SUPPRESS,
thParser = argparse.ArgumentParser(add_help=False, formatter_class=argparse.ArgumentDefaultsHelpFormatter)
thGrpTitle = "Test Helper Arguments"
thGrpDescription="Test Helper configuration items used to configure and spin up the regression test framework and blockchain environment."
thGrp = thParser.add_argument_group(title=thGrpTitle, description=thGrpDescription)
thGrp.add_argument('-?', action='help', default=argparse.SUPPRESS,
ScottBailey marked this conversation as resolved.
Show resolved Hide resolved
help=argparse._('show this help message and exit'))

if "-p" in includeArgs:
parser.add_argument("-p", type=int, help="producing nodes count", default=1)
thGrp.add_argument("-p", type=int, help="producing nodes count", default=1)
if "-n" in includeArgs:
parser.add_argument("-n", type=int, help="total nodes", default=0)
thGrp.add_argument("-n", type=int, help="total nodes", default=0)
if "-d" in includeArgs:
parser.add_argument("-d", type=int, help="delay between nodes startup", default=1)
thGrp.add_argument("-d", type=int, help="delay between nodes startup", default=1)
if "--nodes-file" in includeArgs:
parser.add_argument("--nodes-file", type=str, help="File containing nodes info in JSON format.")
thGrp.add_argument("--nodes-file", type=str, help="File containing nodes info in JSON format.")
if "-s" in includeArgs:
parser.add_argument("-s", type=str, help="topology", choices=["mesh"], default="mesh")
thGrp.add_argument("-s", type=str, help="topology", choices=["mesh"], default="mesh")
if "-c" in includeArgs:
parser.add_argument("-c", type=str, help="chain strategy",
thGrp.add_argument("-c", type=str, help="chain strategy",
choices=[Utils.SyncResyncTag, Utils.SyncReplayTag, Utils.SyncNoneTag, Utils.SyncHardReplayTag],
default=Utils.SyncResyncTag)
if "--kill-sig" in includeArgs:
parser.add_argument("--kill-sig", type=str, choices=[Utils.SigKillTag, Utils.SigTermTag], help="kill signal.",
thGrp.add_argument("--kill-sig", type=str, choices=[Utils.SigKillTag, Utils.SigTermTag], help="kill signal.",
default=Utils.SigKillTag)
if "--kill-count" in includeArgs:
parser.add_argument("--kill-count", type=int, help="nodeos instances to kill", default=-1)
thGrp.add_argument("--kill-count", type=int, help="nodeos instances to kill", default=-1)
if "--terminate-at-block" in includeArgs:
parser.add_argument("--terminate-at-block", type=int, help="block to terminate on when replaying", default=0)
thGrp.add_argument("--terminate-at-block", type=int, help="block to terminate on when replaying", default=0)
if "--seed" in includeArgs:
parser.add_argument("--seed", type=int, help="random seed", default=1)
thGrp.add_argument("--seed", type=int, help="random seed", default=1)

if "--host" in includeArgs:
parser.add_argument("-h", "--host", type=str, help="%s host name" % (Utils.EosServerName),
thGrp.add_argument("-h", "--host", type=str, help="%s host name" % (Utils.EosServerName),
default=TestHelper.LOCAL_HOST)
if "--port" in includeArgs:
parser.add_argument("--port", type=int, help="%s host port" % Utils.EosServerName,
thGrp.add_argument("--port", type=int, help="%s host port" % Utils.EosServerName,
default=TestHelper.DEFAULT_PORT)
if "--wallet-host" in includeArgs:
parser.add_argument("--wallet-host", type=str, help="%s host" % Utils.EosWalletName,
thGrp.add_argument("--wallet-host", type=str, help="%s host" % Utils.EosWalletName,
default=TestHelper.LOCAL_HOST)
if "--wallet-port" in includeArgs:
parser.add_argument("--wallet-port", type=int, help="%s port" % Utils.EosWalletName,
thGrp.add_argument("--wallet-port", type=int, help="%s port" % Utils.EosWalletName,
default=TestHelper.DEFAULT_WALLET_PORT)
if "--prod-count" in includeArgs:
parser.add_argument("-c", "--prod-count", type=int, help="Per node producer count", default=1)
thGrp.add_argument("-c", "--prod-count", type=int, help="Per node producer count", default=1)
if "--defproducera_prvt_key" in includeArgs:
parser.add_argument("--defproducera_prvt_key", type=str, help="defproducera private key.")
thGrp.add_argument("--defproducera_prvt_key", type=str, help="defproducera private key.")
if "--defproducerb_prvt_key" in includeArgs:
parser.add_argument("--defproducerb_prvt_key", type=str, help="defproducerb private key.")
thGrp.add_argument("--defproducerb_prvt_key", type=str, help="defproducerb private key.")
if "--dump-error-details" in includeArgs:
parser.add_argument("--dump-error-details",
thGrp.add_argument("--dump-error-details",
help="Upon error print etc/eosio/node_*/config.ini and var/lib/node_*/stderr.log to stdout",
action='store_true')
if "--dont-launch" in includeArgs:
parser.add_argument("--dont-launch", help="Don't launch own node. Assume node is already running.",
thGrp.add_argument("--dont-launch", help="Don't launch own node. Assume node is already running.",
action='store_true')
if "--keep-logs" in includeArgs:
parser.add_argument("--keep-logs", help="Don't delete var/lib/node_* folders, or other test specific log directories, upon test completion",
thGrp.add_argument("--keep-logs", help="Don't delete var/lib/node_* folders, or other test specific log directories, upon test completion",
action='store_true')
if "-v" in includeArgs:
parser.add_argument("-v", help="verbose logging", action='store_true')
thGrp.add_argument("-v", help="verbose logging", action='store_true')
if "--leave-running" in includeArgs:
parser.add_argument("--leave-running", help="Leave cluster running after test finishes", action='store_true')
thGrp.add_argument("--leave-running", help="Leave cluster running after test finishes", action='store_true')
if "--only-bios" in includeArgs:
parser.add_argument("--only-bios", help="Limit testing to bios node.", action='store_true')
thGrp.add_argument("--only-bios", help="Limit testing to bios node.", action='store_true')
if "--clean-run" in includeArgs:
parser.add_argument("--clean-run", help="Kill all nodeos and keosd instances", action='store_true')
thGrp.add_argument("--clean-run", help="Kill all nodeos and keosd instances", action='store_true')
if "--sanity-test" in includeArgs:
parser.add_argument("--sanity-test", help="Validates nodeos and keosd are in path and can be started up.", action='store_true')
thGrp.add_argument("--sanity-test", help="Validates nodeos and keosd are in path and can be started up.", action='store_true')
if "--alternate-version-labels-file" in includeArgs:
parser.add_argument("--alternate-version-labels-file", type=str, help="Provide a file to define the labels that can be used in the test and the path to the version installation associated with that.")
thGrp.add_argument("--alternate-version-labels-file", type=str, help="Provide a file to define the labels that can be used in the test and the path to the version installation associated with that.")

if len(applicationSpecificArgs.args) > 0:
appArgsGrpTitle="Application Specific Arguments"
appArgsGrpdescription="Test Helper configuration items used to configure and spin up the regression test framework and blockchain environment."
appArgsGrp = thParser.add_argument_group(title=appArgsGrpTitle, description=appArgsGrpdescription)
for arg in applicationSpecificArgs.args:
if arg.type is not None:
appArgsGrp.add_argument(arg.flag, type=arg.type, help=arg.help, choices=arg.choices, default=arg.default)
else:
appArgsGrp.add_argument(arg.flag, help=arg.help, action=arg.action)

for arg in applicationSpecificArgs.args:
if arg.type is not None:
parser.add_argument(arg.flag, type=arg.type, help=arg.help, choices=arg.choices, default=arg.default)
else:
parser.add_argument(arg.flag, help=arg.help, action=arg.action)
return thParser

@staticmethod
# pylint: disable=too-many-branches
# pylint: disable=too-many-statements
def parse_args(includeArgs, applicationSpecificArgs=AppArgs()):
parser = TestHelper.createArgumentParser(includeArgs=includeArgs, applicationSpecificArgs=applicationSpecificArgs)
args = parser.parse_args()
return args

Expand Down
Loading