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

Language server: Add test for diagnostics #1233

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

turbolent
Copy link
Member


  • 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

@turbolent turbolent self-assigned this Nov 10, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #1233 (1bf0548) into master (4348c5d) will decrease coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1233      +/-   ##
==========================================
- Coverage   77.46%   77.41%   -0.06%     
==========================================
  Files         273      273              
  Lines       34764    34823      +59     
==========================================
+ Hits        26929    26957      +28     
- Misses       6760     6791      +31     
  Partials     1075     1075              
Flag Coverage Δ
unittests 77.41% <ø> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
runtime/convertTypes.go 76.54% <0.00%> (-2.61%) ⬇️
encoding/json/decode.go 71.12% <0.00%> (-2.07%) ⬇️
runtime/interpreter/errors.go 23.20% <0.00%> (-0.19%) ⬇️
encoding/json/encode.go 93.42% <0.00%> (ø)
runtime/interpreter/interpreter.go 89.04% <0.00%> (+<0.01%) ⬆️
runtime/interpreter/primitivestatictype.go 75.23% <0.00%> (+0.93%) ⬆️
types.go 76.92% <0.00%> (+1.51%) ⬆️
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 4348c5d...1bf0548. Read the comment docs.

@github-actions
Copy link

Cadence Benchstat comparison

This branch with compared with the base branch onflow:master commit 5090f51
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.6ms ± 4%17.3ms ± 5%~(p=0.383 n=7+7)
RuntimeStorageWriteCached-2146µs ± 3%148µs ± 4%~(p=0.383 n=7+7)
RuntimeFungibleTokenTransfer-21.30ms ± 3%1.48ms ±20%~(p=0.318 n=7+7)
NewInterpreter/new_interpreter-21.22µs ± 2%1.22µs ± 1%~(p=0.619 n=6+6)
NewInterpreter/new_sub-interpreter-22.20µs ± 2%2.18µs ± 2%~(p=0.165 n=7+7)
InterpretRecursionFib-22.87ms ± 3%2.90ms ± 3%~(p=0.383 n=7+7)
ContractInterfaceFungibleToken-252.1µs ± 3%50.1µs ± 2%−3.84%(p=0.001 n=7+7)
ParseDeploy/decode_hex-21.67ms ± 2%1.55ms ± 3%−7.00%(p=0.001 n=7+7)
ParseDeploy/byte_array-238.0ms ± 2%35.3ms ± 3%−7.17%(p=0.001 n=7+7)
QualifiedIdentifierCreation/One_level-23.71ns ± 4%3.42ns ± 2%−7.86%(p=0.001 n=7+7)
ParseInfix-227.2µs ± 2%24.8µs ± 1%−8.60%(p=0.001 n=7+7)
QualifiedIdentifierCreation/Three_levels-2199ns ± 3%179ns ± 3%−9.69%(p=0.001 n=7+7)
ParseArray-225.8ms ± 1%23.2ms ± 1%−9.98%(p=0.001 n=7+6)
ParseFungibleToken-2538µs ± 2%478µs ± 4%−11.14%(p=0.001 n=7+7)
CheckContractInterfaceFungibleTokenConformance-2206µs ± 3%179µs ± 6%−12.78%(p=0.001 n=7+7)
 
alloc/opdelta
RuntimeResourceDictionaryValues-24.33MB ± 0%4.33MB ± 0%~(p=0.383 n=7+7)
RuntimeStorageWriteCached-283.7kB ± 0%83.7kB ± 0%~(p=0.385 n=7+6)
RuntimeFungibleTokenTransfer-2225kB ± 0%225kB ± 0%~(p=0.927 n=7+7)
QualifiedIdentifierCreation/One_level-20.00B 0.00B ~(all equal)
QualifiedIdentifierCreation/Three_levels-264.0B ± 0%64.0B ± 0%~(all equal)
CheckContractInterfaceFungibleTokenConformance-266.4kB ± 0%66.4kB ± 0%~(p=0.053 n=5+7)
ContractInterfaceFungibleToken-226.7kB ± 0%26.7kB ± 0%~(all equal)
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%~(all equal)
 
allocs/opdelta
RuntimeResourceDictionaryValues-2108k ± 0%108k ± 0%~(p=0.763 n=7+7)
RuntimeStorageWriteCached-21.42k ± 0%1.42k ± 0%~(all equal)
RuntimeFungibleTokenTransfer-24.38k ± 0%4.38k ± 0%~(p=0.192 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-2458 ± 0%458 ± 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)
 

@turbolent turbolent merged commit 4c67011 into master Nov 22, 2021
@turbolent turbolent deleted the bastian/test-language-server-diagnostics branch November 22, 2021 23:51
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