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] Use EOSMechanics contract with Performance Test #713

Conversation

ClaytonCalabrese
Copy link
Contributor

@ClaytonCalabrese ClaytonCalabrese commented Feb 11, 2023

A retooling was needed to enable EOS Mechanics to be used with the transaction generator. In addition, EOS mechanics was brought into the codebase. In cluster, populateWallet and createAccounts were changed to allow them to be called multiple times in the same test, this is so the contract holder account can be set up prior to running the test. specifiedContract was redesigned to better use the pre-existing Account type, and references to keys and account names are now based off account instead. Custom contracts are enabled in performance_test_basic by passing the account-name, abi-file, wasm-file, contract-dir, and user-trx-data-file along the command line.

This PR adds 2 new test runs, performance_test_basic_ex_cpu_trx_spec and performance_test_basic_ex_ram_trx_spec , which run the cpu() and ram() actions from EOS Mechanics in performance_test_basic.

@ClaytonCalabrese ClaytonCalabrese self-assigned this Feb 11, 2023
@@ -0,0 +1,21 @@
MIT License
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We likely want to submodule this in instead of copying it.
Not sure if we need to copy this license file out with other license files.
Thoughts on best way to use this? @arhag @spoonincode @wanderingbort

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo, since we don't distribute the file any further than the builddir (that is, we neither include it in a package nor as part of make install), we probably don't need to do anything with the license besides just ensure it's there next to the source file(s) it pertains to. As you've done.

As far as submodule vs not, I'm unsure. It does feel like a submodule might be more proper but then again it feels awfully heavy for something like this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as submodule vs not, I'm unsure. It does feel like a submodule might be more proper but then again it feels awfully heavy for something like this.

@ClaytonCalabrese said he had to make minor modifications to it to work with our cmake setup. Probably the best course is to just copy it in as this PR has it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah, if we've modified it that's probably best

tests/performance_tests/CMakeLists.txt Outdated Show resolved Hide resolved
tests/performance_tests/CMakeLists.txt Outdated Show resolved Hide resolved
tests/TestHarness/launch_transaction_generators.py Outdated Show resolved Hide resolved
tests/TestHarness/launch_transaction_generators.py Outdated Show resolved Hide resolved
tests/performance_tests/performance_test_basic.py Outdated Show resolved Hide resolved
tests/trx_generator/main.cpp Outdated Show resolved Hide resolved
tests/performance_tests/performance_test_basic.py Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/contracts/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/contracts/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should do the same thing as the other CMakeLists.txt of eosio.wrap and eosio.token etc

…nt for performance test. revert the reversion of the setupWallet change
@ClaytonCalabrese ClaytonCalabrese merged commit 8a0adc4 into feature_performance_harness_stage_2 Feb 23, 2023
@ClaytonCalabrese ClaytonCalabrese deleted the performance_harness_eos_mechanics branch February 23, 2023 17:06
@oschwaldp-oci oschwaldp-oci added the OCI Work exclusive to OCI team label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants