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

Radix-engine-tests reorganisation #1656

Merged
merged 24 commits into from
Nov 30, 2023

Conversation

mstrug-rdx
Copy link
Contributor

@mstrug-rdx mstrug-rdx commented Nov 27, 2023

Summary

radix-engine-tests project reorganisation.

Details

tests directory has been divided into subfolders basing on the execution layers: application, blueprints, system, vm, kernel, db. Files with tests has been moved to new subfolders basing on their content - but here still may be needed some adjustments.

Changing flat file structure to subdirectory based improved compilation time from ~5min to less than 2min due to greatly reduced executables count.

Added library target with common.rs file which contains dedicated module with macros for handling file paths to the assets (workspace blueprints and wasm/rpd files and local blueprint and wat files), and also moved to this file package_loader module (as it is commonly used by lots of tests). This library is used in integration tests and benches targets (everywhere where is an access to assets file paths), so changing asset paths in future will require change in only one place (common.rs).

Added README.md file with some descriptions on how to run the tests.

Copy link

github-actions bot commented Nov 27, 2023

Benchmark for fbc099f

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 77.2±0.53ms 76.4±0.29ms -1.04%
costing::decode_sbor 16.7±0.06µs 19.0±0.07µs +13.77%
costing::decode_sbor_bytes 48.5±0.53µs 47.3±0.46µs -2.47%
costing::deserialize_wasm 1422.3±22.23µs 1433.6±5.85µs +0.79%
costing::instantiate_flash_loan 4.5±0.72ms 4.4±0.72ms -2.22%
costing::instantiate_radiswap 6.6±0.06ms 6.6±0.05ms 0.00%
costing::spin_loop 26.2±0.05ms 26.2±0.05ms 0.00%
costing::validate_sbor_payload 31.4±0.04µs 31.5±0.14µs +0.32%
costing::validate_sbor_payload_bytes 391.4±1.94ns 377.2±2.82ns -3.63%
costing::validate_secp256k1 87.4±0.08µs 87.4±0.04µs 0.00%
costing::validate_wasm 42.8±0.05ms 42.8±0.09ms 0.00%
decimal::add/0 9.3±0.00ns 9.3±0.00ns 0.00%
decimal::add/rust-native 10.8±0.01ns 10.8±0.05ns 0.00%
decimal::add/wasmer 128.1±0.07ns 127.9±0.05ns -0.16%
decimal::add/wasmer-call-native 549.4±0.70ns 552.6±0.40ns +0.58%
decimal::add/wasmi 821.0±4.31ns 825.8±4.34ns +0.58%
decimal::add/wasmi-call-native 8.4±0.03µs 8.4±0.02µs 0.00%
decimal::div/0 200.1±0.31ns 199.7±0.24ns -0.20%
decimal::from_string/0 161.1±0.15ns 163.0±0.09ns +1.18%
decimal::mul/0 158.9±0.03ns 155.5±0.23ns -2.14%
decimal::mul/rust-native 153.3±0.18ns 153.9±0.73ns +0.39%
decimal::mul/wasmer 1698.0±0.80ns 1715.1±2.37ns +1.01%
decimal::mul/wasmer-call-native 729.8±2.50ns 705.5±1.13ns -3.33%
decimal::mul/wasmi 60.6±0.07µs 60.4±0.20µs -0.33%
decimal::mul/wasmi-call-native 8.6±0.01µs 8.5±0.03µs -1.16%
decimal::pow/0 724.7±0.99ns 721.7±1.65ns -0.41%
decimal::pow/rust-native 710.8±3.36ns 708.2±0.63ns -0.37%
decimal::pow/wasmer 7.3±0.01µs 7.3±0.01µs 0.00%
decimal::pow/wasmer-call-native 1173.0±4.57ns 1168.5±1.26ns -0.38%
decimal::pow/wasmi 284.9±0.56µs 282.6±0.43µs -0.81%
decimal::pow/wasmi-call-native 7.4±0.02µs 7.4±0.03µs 0.00%
decimal::root/0 9.5±0.01µs 9.8±0.01µs +3.16%
decimal::sub/0 9.4±0.01ns 9.4±0.01ns 0.00%
decimal::to_string/0 481.1±0.99ns 480.8±0.79ns -0.06%
precise_decimal::add/0 10.5±0.01ns 10.5±0.02ns 0.00%
precise_decimal::add/rust-native 12.4±0.00ns 12.4±0.00ns 0.00%
precise_decimal::add/wasmer 131.9±0.09ns 132.0±0.08ns +0.08%
precise_decimal::add/wasmer-call-native 572.9±0.55ns 590.6±1.11ns +3.09%
precise_decimal::add/wasmi 1039.5±2.89ns 1046.4±3.62ns +0.66%
precise_decimal::add/wasmi-call-native 9.0±0.03µs 8.9±0.01µs -1.11%
precise_decimal::div/0 324.3±0.40ns 328.2±0.79ns +1.20%
precise_decimal::from_string/0 216.6±2.37ns 214.0±0.34ns -1.20%
precise_decimal::mul/0 375.1±6.20ns 358.4±3.83ns -4.45%
precise_decimal::mul/rust-native 326.2±0.81ns 325.0±0.81ns -0.37%
precise_decimal::mul/wasmer 3.8±0.01µs 3.8±0.00µs 0.00%
precise_decimal::mul/wasmer-call-native 937.0±1.21ns 928.7±6.80ns -0.89%
precise_decimal::mul/wasmi 151.1±0.18µs 151.0±0.14µs -0.07%
precise_decimal::mul/wasmi-call-native 9.5±0.01µs 9.5±0.01µs 0.00%
precise_decimal::pow/0 1979.8±19.24ns 1925.8±4.00ns -2.73%
precise_decimal::pow/rust-native 1584.9±3.86ns 1577.2±5.94ns -0.49%
precise_decimal::pow/wasmer 17.9±0.01µs 17.9±0.01µs 0.00%
precise_decimal::pow/wasmer-call-native 2.3±0.00µs 2.3±0.00µs 0.00%
precise_decimal::pow/wasmi 732.2±1.39µs 731.9±1.01µs -0.04%
precise_decimal::pow/wasmi-call-native 16.8±0.02µs 16.9±0.02µs +0.60%
precise_decimal::root/0 66.7±0.04µs 66.2±0.06µs -0.75%
precise_decimal::sub/0 10.5±0.01ns 10.5±0.01ns 0.00%
precise_decimal::to_string/0 807.8±16.01ns 792.9±5.69ns -1.84%
schema::validate_payload 346.9±1.45µs 353.4±1.02µs +1.87%
transaction::radiswap 6.5±0.04ms 6.8±0.06ms +4.62%
transaction::transfer 2.1±0.01ms 2.0±0.00ms -4.76%
transaction_processing::prepare 3.0±0.01ms 3.0±0.01ms 0.00%
transaction_processing::prepare_and_decompile 7.2±0.04ms 7.4±0.02ms +2.78%
transaction_processing::prepare_and_decompile_and_recompile 26.9±0.17ms 28.1±0.15ms +4.46%
transaction_validation::validate_manifest 48.8±0.04µs 48.6±0.03µs -0.41%
transaction_validation::verify_ecdsa 85.0±0.08µs 85.0±0.40µs 0.00%
transaction_validation::verify_ed25519 61.0±0.11µs 60.9±0.11µs -0.16%

@mstrug-rdx mstrug-rdx changed the title Radix-engine-test reorganisation Radix-engine-tests reorganisation Nov 27, 2023
Copy link
Member

@iamyulong iamyulong left a comment

Choose a reason for hiding this comment

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

Overall looks good!

radix-engine-tests/Cargo.toml Outdated Show resolved Hide resolved
@mstrug-rdx mstrug-rdx merged commit f117fb4 into develop Nov 30, 2023
25 checks passed
@mstrug-rdx mstrug-rdx deleted the test/radix-engine-test-reorganization branch November 30, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants