flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

[Access] Get Execution Data by BlockID

Open lolpuddle opened this issue 2 years ago • 1 comments

Closes #3263

lolpuddle avatar Oct 03 '22 16:10 lolpuddle

FVM Benchstat comparison

This branch with compared with the base branch onflow:master commit 57a8fda25f18dc7effdff980adfd3cd022f013ec

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/get_account_and_get_storage_used-234.7ms ± 3%35.5ms ± 2%+2.16%(p=0.035 n=7+6)
RuntimeNFTBatchTransfer-2113ms ± 5%111ms ± 5%~(p=0.318 n=7+7)
RuntimeTransaction/reference_tx-232.2ms ±16%31.8ms ±16%~(p=0.710 n=7+7)
RuntimeTransaction/convert_int_to_string-233.5ms ±13%31.6ms ± 3%~(p=0.234 n=7+6)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-233.6ms ±11%32.5ms ± 4%~(p=0.383 n=7+7)
RuntimeTransaction/get_signer_address-231.0ms ± 5%30.9ms ± 4%~(p=1.000 n=7+7)
RuntimeTransaction/get_public_account-232.6ms ± 1%33.0ms ± 4%~(p=0.639 n=5+7)
RuntimeTransaction/get_account_and_get_balance-2293ms ± 7%282ms ± 4%~(p=0.128 n=7+7)
RuntimeTransaction/get_account_and_get_available_balance-2255ms ± 2%252ms ± 3%~(p=0.097 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-2228ms ± 3%225ms ± 2%~(p=0.138 n=6+7)
RuntimeTransaction/get_signer_vault-237.4ms ± 3%38.0ms ± 2%~(p=0.138 n=7+6)
RuntimeTransaction/get_signer_receiver-246.6ms ± 2%46.3ms ± 8%~(p=0.836 n=6+7)
RuntimeTransaction/transfer_tokens-2198ms ± 2%198ms ± 2%~(p=0.805 n=7+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-236.9ms ± 2%36.9ms ± 1%~(p=1.000 n=7+6)
RuntimeTransaction/load_and_save_long_string_on_signers_address-276.6ms ± 5%76.2ms ± 3%~(p=0.836 n=7+6)
RuntimeTransaction/create_new_account-2803ms ± 2%798ms ± 2%~(p=0.456 n=7+7)
RuntimeTransaction/call_empty_contract_function-233.7ms ± 2%33.5ms ± 3%~(p=0.445 n=6+7)
RuntimeTransaction/emit_event-246.4ms ± 2%45.4ms ± 6%~(p=0.259 n=7+7)
RuntimeTransaction/borrow_array_from_storage-2132ms ± 2%132ms ± 4%~(p=0.710 n=7+7)
RuntimeTransaction/copy_array_from_storage-2136ms ± 2%136ms ± 2%~(p=1.000 n=7+7)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-24.27s ± 3%4.26s ± 5%~(p=0.710 n=7+7)
 
alloc/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeNFTBatchTransfer-252.0MB ± 4%51.6MB ± 6%~(p=0.710 n=7+7)
RuntimeTransaction/reference_tx-233.9MB ± 3%34.1MB ± 3%~(p=0.456 n=7+7)
RuntimeTransaction/convert_int_to_string-234.5MB ± 3%34.1MB ± 2%~(p=0.128 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-234.9MB ± 1%34.5MB ± 3%~(p=0.259 n=7+7)
RuntimeTransaction/get_signer_address-234.1MB ± 1%34.2MB ± 4%~(p=0.945 n=6+7)
RuntimeTransaction/get_public_account-235.0MB ± 3%35.2MB ± 3%~(p=0.620 n=7+7)
RuntimeTransaction/get_account_and_get_balance-2121MB ± 1%121MB ± 2%~(p=0.710 n=7+7)
RuntimeTransaction/get_account_and_get_available_balance-2104MB ± 2%104MB ± 2%~(p=1.000 n=7+6)
RuntimeTransaction/get_account_and_get_storage_used-235.6MB ± 2%35.8MB ± 3%~(p=0.259 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-2100MB ± 2%99MB ± 1%~(p=0.945 n=7+6)
RuntimeTransaction/get_signer_vault-236.2MB ± 3%35.9MB ± 2%~(p=0.456 n=7+7)
RuntimeTransaction/get_signer_receiver-239.8MB ± 4%39.2MB ± 6%~(p=0.318 n=7+7)
RuntimeTransaction/transfer_tokens-283.9MB ± 5%82.5MB ± 3%~(p=0.181 n=7+6)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-235.2MB ± 1%35.3MB ± 3%~(p=0.456 n=7+7)
RuntimeTransaction/load_and_save_long_string_on_signers_address-251.9MB ± 4%51.7MB ± 3%~(p=0.534 n=7+6)
RuntimeTransaction/create_new_account-2183MB ± 3%183MB ± 3%~(p=0.805 n=7+7)
RuntimeTransaction/call_empty_contract_function-234.9MB ± 1%35.0MB ± 2%~(p=0.535 n=7+7)
RuntimeTransaction/emit_event-238.9MB ± 5%38.7MB ± 5%~(p=0.710 n=7+7)
RuntimeTransaction/borrow_array_from_storage-268.8MB ± 2%67.9MB ± 4%~(p=0.383 n=7+7)
RuntimeTransaction/copy_array_from_storage-280.7MB ± 2%81.4MB ± 3%~(p=0.620 n=7+7)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-21.10GB ± 1%1.11GB ± 1%~(p=0.383 n=7+7)
 
allocs/opdelta
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeNFTBatchTransfer-2264k ± 0%263k ± 0%~(p=0.051 n=7+6)
RuntimeTransaction/reference_tx-274.4k ± 0%74.4k ± 0%~(p=0.829 n=7+7)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-297.8k ± 0%97.8k ± 0%~(p=0.110 n=6+7)
RuntimeTransaction/get_signer_address-278.6k ± 0%78.6k ± 0%~(p=0.734 n=7+7)
RuntimeTransaction/get_public_account-2100k ± 0%100k ± 0%~(p=0.214 n=7+6)
RuntimeTransaction/get_account_and_get_balance-21.31M ± 0%1.31M ± 0%~(p=0.902 n=7+7)
RuntimeTransaction/get_account_and_get_available_balance-21.19M ± 0%1.19M ± 0%~(p=0.978 n=6+7)
RuntimeTransaction/get_account_and_get_storage_used-2110k ± 0%110k ± 0%~(p=0.380 n=7+7)
RuntimeTransaction/get_account_and_get_storage_capacity-21.07M ± 0%1.07M ± 0%~(p=1.000 n=7+7)
RuntimeTransaction/get_signer_vault-2117k ± 0%117k ± 0%~(p=0.165 n=7+7)
RuntimeTransaction/get_signer_receiver-2188k ± 0%188k ± 0%~(p=0.124 n=7+6)
RuntimeTransaction/transfer_tokens-2840k ± 0%840k ± 0%~(p=0.559 n=7+7)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-2117k ± 0%117k ± 0%~(p=0.804 n=7+6)
RuntimeTransaction/load_and_save_long_string_on_signers_address-2192k ± 0%192k ± 0%~(p=0.518 n=7+7)
RuntimeTransaction/create_new_account-22.27M ± 0%2.27M ± 0%~(p=0.710 n=7+7)
RuntimeTransaction/call_empty_contract_function-288.8k ± 0%88.8k ± 0%~(p=0.096 n=6+7)
RuntimeTransaction/emit_event-2127k ± 0%127k ± 0%~(p=0.097 n=7+7)
RuntimeTransaction/borrow_array_from_storage-2330k ± 0%330k ± 0%~(p=0.244 n=7+7)
RuntimeTransaction/copy_array_from_storage-2286k ± 0%286k ± 0%~(p=0.971 n=7+7)
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-215.8M ± 0%15.8M ± 0%~(p=0.805 n=7+7)
pkg:github.com/onflow/flow-go/fvm goos:linux goarch:amd64
RuntimeTransaction/convert_int_to_string-286.6k ± 0%86.6k ± 0%−0.01%(p=0.033 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.30k ± 0%1.30k ± 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-244.3k ± 0%44.3k ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string-244.3k ± 0%44.3k ± 0%~(all equal)
RuntimeTransaction/convert_int_to_string_and_concatenate_it-244.3k ± 0%44.3k ± 0%~(all equal)
RuntimeTransaction/get_signer_address-244.3k ± 0%44.3k ± 0%~(all equal)
RuntimeTransaction/get_public_account-244.3k ± 0%44.3k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_balance-216.7M ± 0%16.7M ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_available_balance-25.13M ± 0%5.13M ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_used-244.3k ± 0%44.3k ± 0%~(all equal)
RuntimeTransaction/get_account_and_get_storage_capacity-25.13M ± 0%5.13M ± 0%~(all equal)
RuntimeTransaction/get_signer_vault-244.5k ± 0%44.5k ± 0%~(all equal)
RuntimeTransaction/get_signer_receiver-244.9k ± 0%44.9k ± 0%~(all equal)
RuntimeTransaction/transfer_tokens-245.2k ± 0%45.2k ± 0%~(all equal)
RuntimeTransaction/load_and_save_empty_string_on_signers_address-244.4k ± 0%44.4k ± 0%~(all equal)
RuntimeTransaction/load_and_save_long_string_on_signers_address-247.2k ± 0%47.2k ± 0%~(all equal)
RuntimeTransaction/create_new_account-28.39M ± 0%8.39M ± 0%~(all equal)
RuntimeTransaction/call_empty_contract_function-244.5k ± 0%44.5k ± 0%~(all equal)
RuntimeTransaction/emit_event-244.5k ± 0%44.5k ± 0%~(all equal)
RuntimeTransaction/borrow_array_from_storage-249.7k ± 0%49.7k ± 0%~(all equal)
RuntimeTransaction/copy_array_from_storage-249.7k ± 0%49.7k ± 0%~(all equal)
 
us/txdelta
pkg:github.com/onflow/flow-go/engine/execution/computation goos:linux goarch:amd64
ComputeBlock/16/cols/128/txes-22.08k ± 3%2.08k ± 5%~(p=0.710 n=7+7)
 

github-actions[bot] avatar Oct 03 '22 16:10 github-actions[bot]

Codecov Report

Merging #3320 (688908e) into master (57a8fda) will decrease coverage by 0.00%. The diff coverage is 43.65%.

@@            Coverage Diff             @@
##           master    #3320      +/-   ##
==========================================
- Coverage   55.28%   55.27%   -0.01%     
==========================================
  Files         761      763       +2     
  Lines       69750    69952     +202     
==========================================
+ Hits        38560    38668     +108     
- Misses      28018    28095      +77     
- Partials     3172     3189      +17     
Flag Coverage Δ
unittests 55.27% <43.65%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
engine/access/rpc/backend/backend.go 75.66% <0.00%> (-0.70%) :arrow_down:
engine/access/rpc/backend/backend_accounts.go 47.22% <0.00%> (ø)
engine/access/rpc/backend/backend_block_details.go 26.78% <0.00%> (ø)
engine/access/rpc/backend/backend_block_headers.go 31.37% <0.00%> (ø)
engine/access/rpc/backend/backend_events.go 66.66% <0.00%> (ø)
engine/access/rpc/backend/backend_scripts.go 7.84% <0.00%> (ø)
engine/access/state_stream/engine.go 0.00% <0.00%> (ø)
engine/access/state_stream/handler.go 0.00% <0.00%> (ø)
engine/access/rpc/backend/backend_transactions.go 50.00% <15.38%> (ø)
engine/access/state_stream/api.go 58.62% <58.62%> (ø)
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Oct 21 '22 16:10 codecov-commenter