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

Export StringAtreeValue from the interpreter #1366

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

dsainati1
Copy link
Contributor

In order to write a migration for storage to the new ordered map format, this type needs to be accessible outside of the interpreter package.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@dsainati1 dsainati1 self-assigned this Jan 18, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1366 (56788ef) into master (92295d5) will increase coverage by 0.00%.
The diff coverage is 92.85%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1366   +/-   ##
=======================================
  Coverage   75.83%   75.83%           
=======================================
  Files         279      279           
  Lines       38770    38770           
=======================================
+ Hits        29400    29401    +1     
+ Misses       8010     8009    -1     
  Partials     1360     1360           
Flag Coverage Δ
unittests 75.83% <92.85%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
runtime/interpreter/encode.go 65.70% <ø> (ø)
runtime/interpreter/value.go 71.37% <90.47%> (ø)
runtime/interpreter/storagemap.go 74.48% <92.85%> (ø)
runtime/interpreter/decode.go 44.70% <100.00%> (ø)
runtime/interpreter/interpreter.go 88.14% <100.00%> (ø)
runtime/interpreter/stringatreevalue.go 81.81% <100.00%> (ø)
runtime/sema/simple_type.go 96.42% <0.00%> (+3.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92295d5...56788ef. Read the comment docs.

@github-actions
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit 92295d5
The command for i in {1..N}; do go test ./... -run=XXX -bench=. -shuffle=on; done was used.
Bench tests were run a total of 7 times on each branch.

Results

old.txtnew.txt
time/opdelta
QualifiedIdentifierCreation/Three_levels-2190ns ± 1%196ns ± 2%+2.87%(p=0.002 n=6+6)
RuntimeResourceDictionaryValues-218.6ms ± 2%18.9ms ± 6%~(p=0.259 n=7+7)
RuntimeFungibleTokenTransfer-21.56ms ±36%1.70ms ±19%~(p=0.456 n=7+7)
ParseFungibleToken-2252µs ± 2%252µs ± 4%~(p=0.945 n=6+7)
ParseDeploy/byte_array-226.3ms ± 4%26.6ms ± 3%~(p=0.366 n=7+6)
ParseDeploy/decode_hex-21.57ms ± 2%1.59ms ± 4%~(p=0.628 n=6+7)
ParseInfix-212.8µs ± 1%13.2µs ± 9%~(p=0.876 n=5+7)
ParseArray-216.8ms ± 4%17.1ms ± 7%~(p=0.445 n=6+7)
QualifiedIdentifierCreation/One_level-23.64ns ± 2%3.69ns ± 2%~(p=0.079 n=7+7)
CheckContractInterfaceFungibleTokenConformance-2193µs ± 6%191µs ± 1%~(p=0.530 n=7+5)
ContractInterfaceFungibleToken-254.4µs ± 2%53.9µs ± 3%~(p=0.383 n=7+7)
NewInterpreter/new_interpreter-21.44µs ± 9%1.40µs ± 1%~(p=0.167 n=7+6)
NewInterpreter/new_sub-interpreter-22.73µs ± 2%2.77µs ± 5%~(p=0.836 n=6+7)
InterpretRecursionFib-23.05ms ± 1%3.06ms ± 2%~(p=0.836 n=6+7)
 
alloc/opdelta
RuntimeResourceDictionaryValues-24.05MB ± 0%4.05MB ± 0%~(p=0.383 n=7+7)
RuntimeFungibleTokenTransfer-2277kB ± 0%277kB ± 0%~(p=0.515 n=7+7)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-265.7kB ± 0%65.7kB ± 0%~(p=0.462 n=7+7)
ContractInterfaceFungibleToken-226.5kB ± 0%26.5kB ± 0%~(p=0.462 n=7+7)
NewInterpreter/new_interpreter-2768B ± 0%768B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-21.24kB ± 0%1.24kB ± 0%~(all equal)
InterpretRecursionFib-21.24MB ± 0%1.24MB ± 0%~(p=1.000 n=7+7)
 
allocs/opdelta
RuntimeResourceDictionaryValues-2102k ± 0%102k ± 0%~(p=0.276 n=7+7)
RuntimeFungibleTokenTransfer-24.61k ± 0%4.61k ± 0%~(p=0.627 n=7+7)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-21.07k ± 0%1.07k ± 0%~(all equal)
ContractInterfaceFungibleToken-2457 ± 0%457 ± 0%~(all equal)
NewInterpreter/new_interpreter-212.0 ± 0%12.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-238.0 ± 0%38.0 ± 0%~(all equal)
InterpretRecursionFib-225.0k ± 0%25.0k ± 0%~(all equal)
 

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