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

[LS] Debugging documentation and utility functions #1601

Merged
merged 4 commits into from
May 9, 2022

Conversation

devbugging
Copy link
Contributor

Description

This PR updates the run.sh script, adds a description on how to debug, and also adds utility functions that can be used to debug on OSX ARM architecture.


  • 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

@devbugging devbugging self-assigned this Apr 22, 2022
@devbugging devbugging changed the title [LS] Debugging improvements [LS] Debugging documentation and utility functions Apr 22, 2022
@codecov
Copy link

codecov bot commented Apr 22, 2022

Codecov Report

Merging #1601 (b904f6e) into master (a296fab) will increase coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1601      +/-   ##
==========================================
+ Coverage   74.67%   74.73%   +0.06%     
==========================================
  Files         288      288              
  Lines       55284    55340      +56     
==========================================
+ Hits        41281    41359      +78     
+ Misses      12508    12487      -21     
+ Partials     1495     1494       -1     
Flag Coverage Δ
unittests 74.73% <ø> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
runtime/sema/check_unary_expression.go 91.07% <0.00%> (-0.31%) ⬇️
runtime/sema/check_expression.go 100.00% <0.00%> (ø)
runtime/sema/check_variable_declaration.go 95.40% <0.00%> (+0.05%) ⬆️
runtime/sema/errors.go 57.48% <0.00%> (+0.18%) ⬆️
runtime/sema/elaboration.go 87.01% <0.00%> (+0.34%) ⬆️
runtime/interpreter/interpreter_expression.go 84.62% <0.00%> (+0.40%) ⬆️
runtime/sema/type_tags.go 94.42% <0.00%> (+0.45%) ⬆️
runtime/sema/checker.go 90.48% <0.00%> (+1.00%) ⬆️
runtime/sema/simple_type.go 96.15% <0.00%> (+3.84%) ⬆️

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 a296fab...b904f6e. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Apr 22, 2022

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit aa2ae0d
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
RuntimeFungibleTokenTransfer-21.14ms ±28%1.29ms ±26%~(p=0.259 n=7+7)
RuntimeResourceDictionaryValues-26.31ms ± 2%6.24ms ± 2%~(p=0.165 n=7+7)
Transfer-284.1ns ± 1%84.3ns ± 1%~(p=0.594 n=7+7)
ParseFungibleToken-2186µs ± 7%186µs ± 7%~(p=1.000 n=7+7)
ParseArray-212.4ms ± 4%12.7ms ± 6%~(p=0.234 n=6+7)
ParseInfix-28.39µs ± 0%8.41µs ± 0%~(p=0.620 n=7+7)
ParseDeploy/byte_array-219.6ms ± 1%19.5ms ± 1%~(p=0.318 n=7+7)
ParseDeploy/decode_hex-21.15ms ± 0%1.15ms ± 1%~(p=0.931 n=5+6)
QualifiedIdentifierCreation/One_level-22.34ns ± 0%2.34ns ± 0%~(p=0.494 n=6+6)
QualifiedIdentifierCreation/Three_levels-2138ns ± 2%138ns ± 3%~(p=0.939 n=7+7)
CheckContractInterfaceFungibleTokenConformance-2134µs ± 4%130µs ± 1%~(p=0.051 n=7+6)
ContractInterfaceFungibleToken-238.9µs ± 1%39.1µs ± 1%~(p=0.181 n=7+6)
NewInterpreter/new_interpreter-21.13µs ± 0%1.13µs ± 0%~(p=0.078 n=6+6)
NewInterpreter/new_sub-interpreter-22.20µs ± 0%2.20µs ± 0%~(p=1.000 n=6+7)
InterpretRecursionFib-22.67ms ± 3%2.66ms ± 2%~(p=0.945 n=7+6)
 
alloc/opdelta
RuntimeFungibleTokenTransfer-2273kB ± 0%273kB ± 0%~(p=0.301 n=7+7)
RuntimeResourceDictionaryValues-22.25MB ± 0%2.25MB ± 0%~(p=0.736 n=7+7)
Transfer-248.0B ± 0%48.0B ± 0%~(all equal)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-266.3kB ± 0%66.3kB ± 0%~(p=0.462 n=7+7)
ContractInterfaceFungibleToken-226.7kB ± 0%26.7kB ± 0%~(p=0.245 n=6+7)
NewInterpreter/new_interpreter-2848B ± 0%848B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-21.34kB ± 0%1.34kB ± 0%~(all equal)
InterpretRecursionFib-21.14MB ± 0%1.14MB ± 0%−0.00%(p=0.042 n=6+7)
 
allocs/opdelta
RuntimeFungibleTokenTransfer-24.58k ± 0%4.58k ± 0%~(p=0.298 n=7+7)
RuntimeResourceDictionaryValues-237.6k ± 0%37.6k ± 0%~(p=0.515 n=7+5)
Transfer-21.00 ± 0%1.00 ± 0%~(all equal)
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-2460 ± 0%460 ± 0%~(all equal)
NewInterpreter/new_interpreter-213.0 ± 0%13.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-240.0 ± 0%40.0 ± 0%~(all equal)
InterpretRecursionFib-223.8k ± 0%23.8k ± 0%~(all equal)
 

@devbugging
Copy link
Contributor Author

@turbolent I will update this PR according to your new feedback if it works on M1. In any case this logging utility is also useful.

@devbugging
Copy link
Contributor Author

Oh, now I see you made that PR. Thank you.

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.

2 participants