Skip to content

Improve tests#4511

Merged
SupunS merged 4 commits into
masterfrom
supun/improve-tests
Jul 6, 2026
Merged

Improve tests#4511
SupunS merged 4 commits into
masterfrom
supun/improve-tests

Conversation

@SupunS

@SupunS SupunS commented Jun 26, 2026

Copy link
Copy Markdown
Member

Description

Add some more tests to cover missing scenarios


  • 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 self-assigned this Jun 26, 2026
@SupunS SupunS added the Testing label Jun 26, 2026
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

Benchstat comparison

  • Base branch: onflow:master
  • Base commit: 3fa2a11
Results

old.txtnew.txt
time/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-4914ns ± 0%904ns ± 0%~(p=1.000 n=1+1)
ByteArrayValueToByteSlice-462.6ns ± 0%64.1ns ± 0%~(p=1.000 n=1+1)
ByteSliceToByteArrayValue-4751ns ± 0%768ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4289µs ± 0%287µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-42.93µs ± 0%2.79µs ± 0%~(p=1.000 n=1+1)
Emit-43.60ms ± 0%3.56ms ± 0%~(p=1.000 n=1+1)
EnumTransfer-41.08µs ± 0%1.06µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4195ns ± 0%195ns ± 0%~(p=1.000 n=1+1)
ExportType/simple_type-432.8ns ± 0%32.8ns ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-416.2µs ± 0%16.8µs ± 0%~(p=1.000 n=1+1)
InterpretRecursionFib-41.72ms ± 0%1.73ms ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_interpreter-4668ns ± 0%717ns ± 0%~(p=1.000 n=1+1)
NewInterpreter/new_sub-interpreter-4247ns ± 0%262ns ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4481µs ± 0%496µs ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-42.14ms ± 0%2.08ms ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-47.24ms ± 0%7.27ms ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-412.4µs ± 0%12.1µs ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-431.6µs ± 0%32.7µs ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-448.4ns ± 0%46.9ns ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-41.03kB ± 0%1.04kB ± 0%~(p=1.000 n=1+1)
ByteArrayValueToByteSlice-432.0B ± 0%32.0B ± 0%~(all equal)
ByteSliceToByteArrayValue-4825B ± 0%824B ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-4145kB ± 0%145kB ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-42.51kB ± 0%2.50kB ± 0%~(p=1.000 n=1+1)
Emit-41.48MB ± 0%1.48MB ± 0%~(p=1.000 n=1+1)
EnumTransfer-4870B ± 0%869B ± 0%~(p=1.000 n=1+1)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-4112B ± 0%112B ± 0%~(all equal)
ExportType/simple_type-40.00B 0.00B ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-48.30kB ± 0%8.30kB ± 0%~(all equal)
InterpretRecursionFib-41.17MB ± 0%1.17MB ± 0%~(all equal)
NewInterpreter/new_interpreter-4976B ± 0%976B ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-4232B ± 0%232B ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-4173kB ± 0%174kB ± 0%~(p=1.000 n=1+1)
RuntimeResourceDictionaryValues-41.77MB ± 0%1.77MB ± 0%~(p=1.000 n=1+1)
RuntimeResourceTracking-46.92MB ± 0%6.91MB ± 0%~(p=1.000 n=1+1)
RuntimeScriptNoop-48.04kB ± 0%8.05kB ± 0%~(p=1.000 n=1+1)
RuntimeVMInvokeContractImperativeFib-414.3kB ± 0%14.3kB ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-432.0B ± 0%32.0B ± 0%~(all equal)
 
allocs/opdelta
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ByteArrayTransfer-47.00 ± 0%7.00 ± 0%~(all equal)
ByteArrayValueToByteSlice-41.00 ± 0%1.00 ± 0%~(all equal)
ByteSliceToByteArrayValue-45.00 ± 0%5.00 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ContractFunctionInvocation-42.23k ± 0%2.23k ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
EMVAddressTransfer-429.0 ± 0%29.0 ± 0%~(all equal)
Emit-441.0k ± 0%41.0k ± 0%~(all equal)
EnumTransfer-413.0 ± 0%13.0 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
ExportType/composite_type-42.00 ± 0%2.00 ± 0%~(all equal)
ExportType/simple_type-40.00 0.00 ~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ImperativeFib-4176 ± 0%176 ± 0%~(all equal)
InterpretRecursionFib-416.5k ± 0%16.5k ± 0%~(all equal)
NewInterpreter/new_interpreter-415.0 ± 0%15.0 ± 0%~(all equal)
NewInterpreter/new_sub-interpreter-44.00 ± 0%4.00 ± 0%~(all equal)
pkg:github.com/onflow/cadence/runtime goos:linux goarch:amd64
RuntimeFungibleTokenTransferInterpreter-43.21k ± 0%3.21k ± 0%~(all equal)
RuntimeResourceDictionaryValues-436.7k ± 0%36.7k ± 0%~(all equal)
RuntimeResourceTracking-4128k ± 0%128k ± 0%~(all equal)
RuntimeScriptNoop-4113 ± 0%113 ± 0%~(all equal)
RuntimeVMInvokeContractImperativeFib-4481 ± 0%481 ± 0%~(all equal)
pkg:github.com/onflow/cadence/interpreter goos:linux goarch:amd64
ValueIsSubtypeOfSemaType-41.00 ± 0%1.00 ± 0%~(all equal)
 

@SupunS SupunS marked this pull request as ready for review June 26, 2026 19:45
@SupunS SupunS requested a review from turbolent as a code owner June 26, 2026 19:45

@turbolent turbolent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@SupunS SupunS merged commit 5da1ada into master Jul 6, 2026
15 of 17 checks passed
@SupunS SupunS deleted the supun/improve-tests branch July 6, 2026 16:00
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