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

Add fast-test option to makefile #1589

Merged
merged 2 commits into from
Apr 18, 2022
Merged

Add fast-test option to makefile #1589

merged 2 commits into from
Apr 18, 2022

Conversation

dsainati1
Copy link
Contributor

@dsainati1 dsainati1 commented Apr 18, 2022

This adds a make fast-test option to just run the basic tests without the coverage and race detection for easier testing locally.


  • 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

Makefile Outdated Show resolved Hide resolved
# remove coverage of empty functions from report
sed -i -e 's/^.* 0 0$$//' coverage.txt
cd ./languageserver && make test

.PHONY: fast-test
Copy link
Member

Choose a reason for hiding this comment

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

Good idea! This is what developers working on Cadence normally run locally; race detection, and coverage are much more CI features and add significant overhead 👍

@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

Merging #1589 (d817b4b) into master (477f6ab) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1589   +/-   ##
=======================================
  Coverage   74.70%   74.71%           
=======================================
  Files         288      288           
  Lines       55284    55284           
=======================================
+ Hits        41301    41303    +2     
+ Misses      12489    12487    -2     
  Partials     1494     1494           
Flag Coverage Δ
unittests 74.71% <ø> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
runtime/interpreter/storage.go 72.78% <0.00%> (+1.36%) ⬆️

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 477f6ab...d817b4b. Read the comment docs.

@dsainati1 dsainati1 changed the title Fix race detector test on MacOS Monterey Add fast-test option to makefile Apr 18, 2022
@github-actions
Copy link

github-actions bot commented Apr 18, 2022

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit 477f6ab
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
RuntimeResourceDictionaryValues-26.77ms ± 4%6.63ms ± 4%~(p=0.165 n=7+7)
RuntimeFungibleTokenTransfer-21.20ms ±37%1.19ms ±33%~(p=0.710 n=7+7)
Transfer-289.7ns ± 3%88.5ns ± 5%~(p=0.334 n=7+7)
ParseArray-213.5ms ± 2%13.7ms ± 5%~(p=0.535 n=7+7)
ParseDeploy/byte_array-222.2ms ± 8%22.2ms ± 7%~(p=0.805 n=7+7)
ParseDeploy/decode_hex-21.19ms ± 2%1.18ms ± 4%~(p=0.535 n=7+7)
ParseFungibleToken-2185µs ± 4%187µs ± 7%~(p=0.445 n=7+6)
ParseInfix-28.86µs ± 4%8.63µs ± 4%~(p=0.073 n=7+7)
QualifiedIdentifierCreation/One_level-22.34ns ± 0%2.35ns ± 0%~(p=0.247 n=7+7)
QualifiedIdentifierCreation/Three_levels-2141ns ± 1%142ns ± 4%~(p=0.345 n=6+7)
CheckContractInterfaceFungibleTokenConformance-2138µs ± 5%135µs ± 1%~(p=0.534 n=7+6)
ContractInterfaceFungibleToken-240.1µs ± 2%40.4µs ± 2%~(p=0.295 n=6+7)
NewInterpreter/new_interpreter-21.16µs ± 1%1.19µs ± 6%~(p=0.181 n=6+7)
NewInterpreter/new_sub-interpreter-22.26µs ± 1%2.30µs ± 6%~(p=0.836 n=6+7)
InterpretRecursionFib-22.90ms ± 5%2.90ms ± 1%~(p=0.902 n=7+7)
 
alloc/opdelta
RuntimeFungibleTokenTransfer-2273kB ± 0%273kB ± 0%~(p=0.594 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.2kB ± 0%66.2kB ± 0%~(p=0.245 n=7+6)
ContractInterfaceFungibleToken-226.6kB ± 0%26.6kB ± 0%~(p=0.286 n=7+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%~(p=1.000 n=7+7)
RuntimeResourceDictionaryValues-22.25MB ± 0%2.25MB ± 0%−0.01%(p=0.035 n=7+6)
 
allocs/opdelta
RuntimeResourceDictionaryValues-237.6k ± 0%37.6k ± 0%~(p=0.363 n=7+7)
RuntimeFungibleTokenTransfer-24.58k ± 0%4.58k ± 0%~(p=1.000 n=7+7)
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-2458 ± 0%458 ± 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)
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants