ref-fvm icon indicating copy to clipboard operation
ref-fvm copied to clipboard

Measuring test vector coverage

Open Stebalien opened this issue 3 years ago • 6 comments

It would be really nice to measure what parts of actors are covered by our current test vectors.

Stebalien avatar Feb 09 '22 00:02 Stebalien

so basically speaking:

  1. tracing & collecting profile data from inside the wasm runtime and make the data human-readable
  2. find some way to enable the tracing only in dev mode (tests & benchmarks)

for step 1,

is that right?

dtynn avatar Feb 10 '22 01:02 dtynn

hi @Stebalien would like to know if wasm-coverage-demo is helpful for this issue ?

dtynn avatar Feb 11 '22 09:02 dtynn

completed a simple demo,

and captured a coverage report for executing test-vectors/corpus/extracted/0005-chocolate-01/fil_6_storagemarket/WithdrawBalance/Ok/ext-0005-fil_6_storagemarket-WithdrawBalance-Ok-1.json.

dtynn avatar Feb 12 '22 17:02 dtynn

tracing & collecting profile data from inside the wasm runtime and make the data human-readable

Yes and yes.

find some way to enable the tracing only in dev mode (tests & benchmarks)

Also yes. We'll have to have some way to compile actors with tracing enabled.

Stebalien avatar Feb 16 '22 01:02 Stebalien

completed a simple demo,

That's awesome!

Note: We probably don't need the human readable side of things. As long as the format is compatible with codecov.

@raulk is currently in the process of factoring out the actors into a separate repo (with a single wasm build script so this should be a bit simpler). Once that lands, are you up for making a PR?

Stebalien avatar Feb 16 '22 01:02 Stebalien

Note: We probably don't need the human readable side of things. As long as the format is compatible with codecov.

sure, the reults could be the compatible format, or at least they should be easily converted to, since all the things are generated by llvm-cov

@raulk is currently in the process of factoring out the actors into a separate repo (with a single wasm build script so this should be a bit simpler). Once that lands, are you up for making a PR?

of course :)

dtynn avatar Feb 16 '22 01:02 dtynn