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

Improve logging macros to work with IDEs better #2043

Merged
merged 6 commits into from
Dec 20, 2024

Conversation

lrubasze
Copy link
Contributor

Summary

Improve logging macros to work with IDEs better

Testing

Respective tests added

Update Recommendations

Change is backward-compatible. No actions required

Copy link

github-actions bot commented Dec 19, 2024

Docker tags
docker.io/radixdlt/private-scrypto-builder:4290347c41

Copy link

github-actions bot commented Dec 19, 2024

Benchmark for 4290347

Click to view benchmark
Test Base PR %
costing::bench_prepare_wasm 44.4±0.11ms 44.5±0.16ms +0.23%
costing::decode_encoded_i8_array_to_manifest_raw_value 19.3±0.01ms 19.3±0.01ms 0.00%
costing::decode_encoded_i8_array_to_manifest_value 41.6±0.15ms 42.5±0.09ms +2.16%
costing::decode_encoded_tuple_array_to_manifest_raw_value 70.5±0.11ms 72.1±0.09ms +2.27%
costing::decode_encoded_tuple_array_to_manifest_value 119.0±1.22ms 121.7±1.18ms +2.27%
costing::decode_encoded_u8_array_to_manifest_raw_value 31.8±0.08µs 25.7±0.08µs -19.18%
costing::decode_encoded_u8_array_to_manifest_value 41.4±0.09ms 42.5±0.11ms +2.66%
costing::decode_rpd_to_manifest_raw_value 14.7±0.03µs 14.5±0.04µs -1.36%
costing::decode_rpd_to_manifest_value 11.1±0.03µs 10.8±0.06µs -2.70%
costing::deserialize_wasm 1215.7±2.57µs 1253.4±4.35µs +3.10%
costing::execute_transaction_creating_big_vec_substates 701.3±6.37ms 706.6±14.30ms +0.76%
costing::execute_transaction_reading_big_vec_substates 571.5±1.36ms 690.0±3.76ms +20.73%
costing::instantiate_flash_loan 873.4±422.28µs 847.8±216.38µs -2.93%
costing::instantiate_radiswap 977.4±707.55µs 930.7±558.78µs -4.78%
costing::scrypto_malloc 680.7±1.99ms 655.9±3.80ms -3.64%
costing::scrypto_sbor_decode 662.3±1.97ms 651.8±0.77ms -1.59%
costing::scrypto_sha256 588.3±0.98ms 588.4±0.90ms +0.02%
costing::spin_loop_v1 510.9±0.97ms 523.4±3.92ms +2.45%
costing::spin_loop_v2 595.0±0.80ms 600.8±0.24ms +0.97%
costing::validate_sbor_payload 29.3±0.04µs 29.2±0.06µs -0.34%
costing::validate_sbor_payload_bytes 244.4±0.61ns 243.4±0.66ns -0.41%
costing::validate_secp256k1 76.6±0.06µs 76.6±0.04µs 0.00%
costing::validate_wasm 33.7±0.04ms 34.7±0.03ms +2.97%
decimal::add/0 8.4±0.00ns 8.4±0.01ns 0.00%
decimal::add/rust-native 9.8±0.00ns 9.8±0.00ns 0.00%
decimal::add/wasmi 316.8±1.78ns 315.9±1.61ns -0.28%
decimal::add/wasmi-call-native 2.9±0.01µs 2.8±0.01µs -3.45%
decimal::div/0 167.0±0.39ns 168.7±0.17ns +1.02%
decimal::from_string/0 156.9±0.16ns 156.0±0.06ns -0.57%
decimal::mul/0 128.3±0.08ns 129.4±0.02ns +0.86%
decimal::mul/rust-native 128.3±0.16ns 126.7±0.13ns -1.25%
decimal::mul/wasmi 20.1±0.07µs 19.9±0.04µs -1.00%
decimal::mul/wasmi-call-native 3.0±0.01µs 3.1±0.00µs +3.33%
decimal::pow/0 592.5±0.21ns 593.1±0.99ns +0.10%
decimal::pow/rust-native 591.3±0.18ns 590.9±0.28ns -0.07%
decimal::pow/wasmi 93.9±0.30µs 94.4±0.42µs +0.53%
decimal::pow/wasmi-call-native 4.8±0.00µs 4.8±0.01µs 0.00%
decimal::root/0 8.2±0.02µs 8.1±0.01µs -1.22%
decimal::sub/0 8.2±0.06ns 8.3±0.01ns +1.22%
decimal::to_string/0 442.7±0.12ns 440.7±0.34ns -0.45%
large_transaction_processing::prepare 2.6±0.00ms 2.7±0.00ms +3.85%
large_transaction_processing::prepare_and_decompile 6.2±0.03ms 6.2±0.04ms 0.00%
large_transaction_processing::prepare_and_decompile_and_recompile 31.6±0.11ms 31.9±0.17ms +0.95%
metadata_validation::validate_urls 5.0±0.18µs 4.8±0.02µs -4.00%
precise_decimal::add/0 8.7±0.04ns 8.7±0.07ns 0.00%
precise_decimal::add/rust-native 10.7±0.01ns 10.9±0.27ns +1.87%
precise_decimal::add/wasmi 421.2±3.39ns 424.4±4.08ns +0.76%
precise_decimal::add/wasmi-call-native 3.7±0.01µs 3.8±0.01µs +2.70%
precise_decimal::div/0 291.1±1.08ns 291.6±0.57ns +0.17%
precise_decimal::from_string/0 201.0±0.19ns 204.7±0.15ns +1.84%
precise_decimal::mul/0 333.4±1.25ns 338.3±1.42ns +1.47%
precise_decimal::mul/rust-native 284.6±0.35ns 287.4±0.28ns +0.98%
precise_decimal::mul/wasmi 49.9±0.52µs 49.3±0.26µs -1.20%
precise_decimal::mul/wasmi-call-native 4.1±0.01µs 4.2±0.01µs +2.44%
precise_decimal::pow/0 1720.9±1.03ns 1721.5±1.14ns +0.03%
precise_decimal::pow/rust-native 1355.2±1.02ns 1355.1±1.41ns -0.01%
precise_decimal::pow/wasmi 235.8±1.51µs 235.8±0.77µs 0.00%
precise_decimal::pow/wasmi-call-native 7.5±0.02µs 7.7±0.01µs +2.67%
precise_decimal::root/0 59.3±0.09µs 57.7±0.04µs -2.70%
precise_decimal::sub/0 8.9±0.05ns 9.0±0.08ns +1.12%
precise_decimal::to_string/0 754.2±2.05ns 739.4±2.01ns -1.96%
schema::validate_payload 385.2±0.62µs 377.9±0.54µs -1.90%
transaction::radiswap 5.0±0.03ms 5.0±0.03ms 0.00%
transaction::transfer 1803.5±2.41µs 1842.8±5.18µs +2.18%
transaction_validation::validate_manifest 43.3±0.06µs 43.2±0.06µs -0.23%
transaction_validation::verify_bls_2KB 1007.2±13.73µs 1068.5±17.81µs +6.09%
transaction_validation::verify_bls_32B 1032.5±30.87µs 1002.8±9.05µs -2.88%
transaction_validation::verify_ecdsa 74.7±0.06µs 74.7±0.05µs 0.00%
transaction_validation::verify_ed25519 42.2±0.08µs 48.9±0.07µs +15.88%

@lrubasze lrubasze force-pushed the fix/scrypto-logging-macros branch from 26d83dd to 507aecb Compare December 19, 2024 16:55
Copy link
Contributor

@dhedey dhedey left a comment

Choose a reason for hiding this comment

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

Nice!

scrypto/src/macros.rs Outdated Show resolved Hide resolved
scrypto/src/macros.rs Show resolved Hide resolved
@lrubasze lrubasze merged commit d13925c into develop Dec 20, 2024
31 checks passed
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