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 container mutation error message #1228

Merged
merged 2 commits into from
Nov 10, 2021
Merged

Improve container mutation error message #1228

merged 2 commits into from
Nov 10, 2021

Conversation

SupunS
Copy link
Member

@SupunS SupunS commented Nov 9, 2021

Closes #1190


  • 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

@SupunS SupunS requested review from turbolent and dsainati1 November 9, 2021 22:32
@SupunS SupunS self-assigned this Nov 9, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2021

Codecov Report

Merging #1228 (3526c05) into master (e8500a0) will increase coverage by 0.00%.
The diff coverage is 33.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1228   +/-   ##
=======================================
  Coverage   77.40%   77.41%           
=======================================
  Files         273      273           
  Lines       34821    34823    +2     
=======================================
+ Hits        26953    26957    +4     
+ Misses       6793     6791    -2     
  Partials     1075     1075           
Flag Coverage Δ
unittests 77.41% <33.33%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
runtime/interpreter/errors.go 23.20% <0.00%> (-0.19%) ⬇️
runtime/interpreter/interpreter.go 89.04% <100.00%> (+<0.01%) ⬆️
runtime/interpreter/primitivestatictype.go 75.23% <0.00%> (+0.93%) ⬆️
runtime/interpreter/simplecompositevalue.go 79.31% <0.00%> (+1.72%) ⬆️

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 e8500a0...3526c05. Read the comment docs.

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice!

@github-actions
Copy link

github-actions bot commented Nov 9, 2021

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit 82e2962
The command go test ./... -run=XXX -bench=. -shuffle=on -count N was used.
Bench tests were run a total of 7 times on each branch.

Results

old.txtnew.txt
time/opdelta
RuntimeResourceDictionaryValues-217.1ms ± 3%17.2ms ± 5%~(p=0.902 n=7+7)
ParseDeploy/byte_array-235.7ms ± 3%35.5ms ± 1%~(p=0.535 n=7+7)
ParseDeploy/decode_hex-21.43ms ± 1%1.45ms ± 3%~(p=0.366 n=6+7)
ParseArray-223.9ms ± 2%24.3ms ± 4%~(p=0.128 n=7+7)
ParseInfix-225.4µs ± 3%25.7µs ± 1%~(p=0.073 n=7+7)
ContractInterfaceFungibleToken-248.4µs ± 1%48.2µs ± 3%~(p=0.628 n=6+7)
CheckContractInterfaceFungibleTokenConformance-2161µs ± 1%160µs ± 1%~(p=0.234 n=7+6)
NewInterpreter/new_interpreter-21.22µs ± 3%1.20µs ± 2%~(p=0.073 n=6+7)
InterpretRecursionFib-22.83ms ± 2%2.79ms ± 1%~(p=0.073 n=7+6)
QualifiedIdentifierCreation/One_level-23.22ns ± 2%3.18ns ± 2%−1.19%(p=0.045 n=6+7)
ParseFungibleToken-2499µs ± 1%485µs ± 1%−2.80%(p=0.001 n=7+7)
NewInterpreter/new_sub-interpreter-22.24µs ± 0%2.17µs ± 1%−3.16%(p=0.004 n=5+6)
QualifiedIdentifierCreation/Three_levels-2176ns ± 1%169ns ± 1%−3.53%(p=0.001 n=6+7)
RuntimeStorageWriteCached-2149µs ± 5%141µs ± 1%−5.17%(p=0.001 n=7+7)
RuntimeFungibleTokenTransfer-21.31ms ±20%1.19ms ± 1%−9.16%(p=0.014 n=7+6)
 
alloc/opdelta
RuntimeFungibleTokenTransfer-2225kB ± 0%225kB ± 0%~(p=0.057 n=7+7)
RuntimeResourceDictionaryValues-24.33MB ± 0%4.33MB ± 0%~(p=0.805 n=7+7)
RuntimeStorageWriteCached-283.7kB ± 0%83.7kB ± 0%~(p=0.140 n=7+6)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
ContractInterfaceFungibleToken-226.7kB ± 0%26.7kB ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-266.4kB ± 0%66.4kB ± 0%~(p=0.385 n=6+7)
NewInterpreter/new_interpreter-2680B ± 0%680B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-21.02kB ± 0%1.02kB ± 0%~(all equal)
InterpretRecursionFib-21.21MB ± 0%1.21MB ± 0%~(p=0.731 n=7+7)
 
allocs/opdelta
RuntimeFungibleTokenTransfer-24.38k ± 0%4.38k ± 0%~(p=0.714 n=7+7)
RuntimeResourceDictionaryValues-2108k ± 0%108k ± 0%~(p=0.539 n=7+7)
RuntimeStorageWriteCached-21.42k ± 0%1.42k ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-20.00 0.00 ~(all equal)
QualifiedIdentifierCreation/Three_levels-22.00 ± 0%2.00 ± 0%~(all equal)
ContractInterfaceFungibleToken-2458 ± 0%458 ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-21.07k ± 0%1.07k ± 0%~(all equal)
NewInterpreter/new_interpreter-211.0 ± 0%11.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-230.0 ± 0%30.0 ± 0%~(all equal)
InterpretRecursionFib-225.0k ± 0%25.0k ± 0%~(all equal)
 

Co-authored-by: Bastian Müller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve container mutation error message
3 participants