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

Fix/simplify value store span attribute setup #3738

Merged
merged 1 commit into from
Jan 3, 2023
Merged

Conversation

pattyshack
Copy link
Contributor

This bug has been here for a while, prior to the environment refactoring. The extra negation on IsSample check meant that we were setting up span attribute on only non-sampled transactions. Nothing got logged.

This bug has been here for a while, prior to the environment refactoring.
The extra negation on IsSample check meant that we were setting up span
attribute on only non-sampled transactions.  Nothing got logged.
@github-actions
Copy link
Contributor

FVM Benchstat comparison

This branch with compared with the base branch onflow:master commit 5b2986f

The command (for i in {1..7}; do go test ./fvm ./engine/execution/computation --bench . --tags relic -shuffle=on --benchmem --run ^$; done) was used.

Collapsed results for better readability

old.txtnew.txt
time/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/reference_tx-228.8ms ±12%27.8ms ± 2%~(p=0.445 n=7+6)
RuntimeTransaction/convert_int_to_string-231.4ms ±16%31.6ms ± 9%~(p=1.000 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-231.1ms ± 2%30.7ms ± 3%~(p=0.209 n=7+7)
RuntimeTransaction/get_signer_address-229.4ms ±13%30.9ms ±16%~(p=0.710 n=7+7)
RuntimeTransaction/get_public_account-230.9ms ± 2%31.2ms ± 4%~(p=0.628 n=6+7)
RuntimeTransaction/get_account_and_get_balance-2251ms ± 1%250ms ± 2%~(p=0.234 n=6+7)
RuntimeTransaction/get_account_and_get_storage_used-233.2ms ± 7%32.3ms ± 4%~(p=0.209 n=7+7)
RuntimeTransaction/get_signer_vault-235.0ms ± 3%35.3ms ± 4%~(p=0.805 n=7+7)
RuntimeTransaction/get_signer_receiver-244.2ms ± 3%44.8ms ± 6%~(p=0.805 n=7+7)
RuntimeTransaction/transfer_tokens-2187ms ± 2%186ms ± 2%~(p=0.620 n=7+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-234.8ms ± 6%34.3ms ± 2%~(p=0.456 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-274.8ms ± 3%75.2ms ± 2%~(p=0.639 n=7+5)
RuntimeTransaction/call_empty_contract_function-231.1ms ± 2%30.7ms ± 3%~(p=0.181 n=6+7)
RuntimeTransaction/emit_event-246.3ms ± 2%45.0ms ± 6%~(p=0.295 n=6+7)
RuntimeTransaction/borrow_array_from_storage-2127ms ± 3%128ms ± 2%~(p=0.620 n=7+7)
RuntimeTransaction/copy_array_from_storage-2128ms ± 2%127ms ± 1%~(p=0.073 n=7+6)
RuntimeNFTBatchTransfer-2117ms ± 3%116ms ± 4%~(p=0.456 n=7+7)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-24.27s ± 1%4.30s ± 2%~(p=0.902 n=7+7)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/create_new_account-2805ms ± 1%794ms ± 2%−1.36%(p=0.011 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-2207ms ± 1%203ms ± 2%−1.92%(p=0.014 n=6+7)
RuntimeTransaction/get_account_and_get_available_balance-2224ms ± 2%219ms ± 1%−2.22%(p=0.002 n=7+7)
 
computationdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/reference_tx-2202 ± 0%202 ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2502 ± 0%502 ± 0%~(all equal)
RuntimeTransaction/get_signer_address-2302 ± 0%302 ± 0%~(all equal)
RuntimeTransaction/get_public_account-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_balance-21.00k ± 0%1.00k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_available_balance-22.60k ± 0%2.60k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_used-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_capacity-21.70k ± 0%1.70k ± 0%~(all equal)
RuntimeTransaction/get_signer_vault-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/get_signer_receiver-2602 ± 0%602 ± 0%~(all equal)
RuntimeTransaction/transfer_tokens-23.50k ± 0%3.50k ± 0%~(all equal)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2602 ± 0%602 ± 0%~(all equal)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2602 ± 0%602 ± 0%~(all equal)
RuntimeTransaction/create_new_account-2202 ± 0%202 ± 0%~(all equal)
RuntimeTransaction/call_empty_contract_function-2402 ± 0%402 ± 0%~(all equal)
RuntimeTransaction/emit_event-2602 ± 0%602 ± 0%~(all equal)
RuntimeTransaction/borrow_array_from_storage-22.60k ± 0%2.60k ± 0%~(all equal)
RuntimeTransaction/copy_array_from_storage-22.60k ± 0%2.60k ± 0%~(all equal)
 
interactionsdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/reference_tx-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/get_signer_address-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/get_public_account-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_balance-223.8M ± 0%23.8M ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_available_balance-25.43M ± 0%5.43M ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_used-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_capacity-25.43M ± 0%5.43M ± 0%~(all equal)
RuntimeTransaction/get_signer_vault-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/get_signer_receiver-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/transfer_tokens-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2212k ± 0%212k ± 0%~(all equal)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2215k ± 0%215k ± 0%~(all equal)
RuntimeTransaction/create_new_account-212.0M ± 0%12.0M ± 0%~(all equal)
RuntimeTransaction/call_empty_contract_function-2213k ± 0%213k ± 0%~(all equal)
RuntimeTransaction/emit_event-2213k ± 0%213k ± 0%~(all equal)
RuntimeTransaction/borrow_array_from_storage-2218k ± 0%218k ± 0%~(all equal)
RuntimeTransaction/copy_array_from_storage-2218k ± 0%218k ± 0%~(all equal)
 
alloc/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_signer_address-234.2MB ± 2%35.1MB ± 2%+2.52%(p=0.002 n=7+7)
RuntimeTransaction/reference_tx-234.6MB ± 4%34.3MB ± 4%~(p=0.535 n=7+7)
RuntimeTransaction/convert_int_to_string-235.0MB ± 3%35.0MB ± 3%~(p=0.945 n=6+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-235.2MB ± 2%35.1MB ± 3%~(p=0.710 n=7+7)
RuntimeTransaction/get_public_account-236.0MB ± 1%36.4MB ± 2%~(p=0.138 n=6+7)
RuntimeTransaction/get_account_and_get_storage_used-236.4MB ± 4%35.3MB ± 4%~(p=0.097 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-2103MB ± 1%101MB ± 5%~(p=0.259 n=7+7)
RuntimeTransaction/get_signer_vault-236.0MB ± 3%36.6MB ± 5%~(p=0.209 n=7+7)
RuntimeTransaction/get_signer_receiver-239.7MB ± 3%40.4MB ± 7%~(p=0.710 n=7+7)
RuntimeTransaction/transfer_tokens-281.5MB ± 2%82.8MB ± 2%~(p=0.445 n=7+6)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-235.7MB ± 3%35.5MB ± 1%~(p=0.628 n=7+6)
RuntimeTransaction/load_and_save_long_string_on_signers_address-252.5MB ± 3%52.7MB ± 3%~(p=1.000 n=7+7)
RuntimeTransaction/create_new_account-2187MB ± 3%183MB ± 2%~(p=0.128 n=7+7)
RuntimeTransaction/call_empty_contract_function-235.6MB ± 2%35.1MB ± 3%~(p=0.165 n=7+7)
RuntimeTransaction/emit_event-241.9MB ± 3%40.7MB ± 7%~(p=0.628 n=6+7)
RuntimeTransaction/borrow_array_from_storage-269.5MB ± 2%70.3MB ± 3%~(p=0.620 n=7+7)
RuntimeTransaction/copy_array_from_storage-281.5MB ± 2%81.7MB ± 2%~(p=1.000 n=7+7)
RuntimeNFTBatchTransfer-254.2MB ± 4%55.3MB ± 2%~(p=0.138 n=7+6)
RuntimeTransaction/get_account_and_get_available_balance-2104MB ± 3%103MB ± 2%−1.38%(p=0.038 n=7+7)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-21.19GB ± 0%1.17GB ± 1%−1.44%(p=0.001 n=6+7)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_account_and_get_balance-2123MB ± 1%121MB ± 2%−2.00%(p=0.007 n=7+7)
 
allocs/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/transfer_tokens-2839k ± 0%838k ± 0%−0.14%(p=0.003 n=5+7)
RuntimeTransaction/borrow_array_from_storage-2333k ± 0%332k ± 0%−0.37%(p=0.001 n=7+7)
RuntimeTransaction/copy_array_from_storage-2290k ± 0%288k ± 0%−0.43%(p=0.001 n=6+7)
RuntimeTransaction/get_signer_receiver-2195k ± 0%193k ± 0%−0.58%(p=0.001 n=7+7)
RuntimeTransaction/emit_event-2134k ± 0%133k ± 0%−0.80%(p=0.001 n=7+7)
RuntimeTransaction/get_account_and_get_storage_used-2116k ± 0%115k ± 0%−0.85%(p=0.001 n=7+7)
RuntimeTransaction/get_signer_vault-2120k ± 0%119k ± 0%−0.89%(p=0.001 n=7+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2118k ± 0%117k ± 0%−0.90%(p=0.001 n=7+7)
RuntimeTransaction/get_public_account-2106k ± 0%105k ± 0%−0.92%(p=0.001 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-2103k ± 0%102k ± 0%−0.95%(p=0.001 n=7+7)
RuntimeTransaction/convert_int_to_string-291.6k ± 0%90.7k ± 0%−1.06%(p=0.001 n=7+7)
RuntimeTransaction/call_empty_contract_function-295.0k ± 0%94.0k ± 0%−1.12%(p=0.003 n=5+7)
RuntimeTransaction/get_signer_address-283.6k ± 0%82.6k ± 0%−1.17%(p=0.000 n=6+7)
RuntimeTransaction/reference_tx-279.4k ± 0%78.4k ± 0%−1.23%(p=0.002 n=6+6)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-216.9M ± 0%16.6M ± 0%−1.76%(p=0.001 n=7+7)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/get_account_and_get_balance-21.32M ± 0%1.29M ± 0%−1.90%(p=0.001 n=7+7)
RuntimeNFTBatchTransfer-2269k ± 0%264k ± 1%−1.94%(p=0.003 n=5+7)
RuntimeTransaction/get_account_and_get_available_balance-21.20M ± 0%1.17M ± 0%−2.09%(p=0.001 n=7+7)
RuntimeTransaction/create_new_account-22.31M ± 0%2.26M ± 0%−2.12%(p=0.001 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2194k ± 0%189k ± 0%−2.13%(p=0.001 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-21.12M ± 0%1.10M ± 0%−2.23%(p=0.001 n=7+7)
 
us/txdelta
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-22.08k ± 1%2.10k ± 2%~(p=0.875 n=7+7)
 

@pattyshack
Copy link
Contributor Author

bors merge

@bors bors bot merged commit b3e2889 into master Jan 3, 2023
@bors bors bot deleted the patrick/value-store-span branch January 3, 2023 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants