Closed codefromthecrypt closed 11 months ago
just noticed the prefilter example was almost 1MB of wasm. trying to figure out why, and reduce it.
I forgot that our baseline size is pretty big (first nottinygc and then tinygo 0.28 is also larger).
Anyway, I was able to make it the same size as score.
$ du -k examples/*/main.wasm
996 examples/filter-simple/main.wasm
960 examples/prefilter-simple/main.wasm
960 examples/score-simple/main.wasm
fixed bench, as the prior commit didn't actually call prefilter. The below is higher because we don't yet cache the pod being scheduled. The next PR should show some dramatic difference
PluginFilterAndScore/test/params:_real-12 169.5µ ± 4%
PluginPrefilterFilterAndScore/test/params:_real-12 218.8µ ± 1%
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: codefromthecrypt, kerthcet
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/lgtm
What type of PR is this?
/kind feature
What this PR does / why we need it:
This implements the prefilter function and configures TinyGo unit tests via
make test-guest
. This runs the same unit tests without TinyGo onmake test
.Which issue(s) this PR fixes:
Special notes for your reviewer:
tinygo test
uses a wasmtime by default, so the Makefile has been updated to switch to wazero.Does this PR introduce a user-facing change?
NONE
What are the benchmark results of this change?