-
Notifications
You must be signed in to change notification settings - Fork 17
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
Implements prefilter and configures TinyGo unit tests #43
Conversation
6a1d8b3
to
83cf90d
Compare
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 |
02d3243
to
03c1d70
Compare
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This implements the prefilter function and configures TinyGo unit tests via `make test-guest`. This runs the same unit tests without TinyGo on `make test`. To avoid segfaults in TinyGo tests, this removes nottinygc as a strict dependency, and instead conventionally adds it when compiling plugins to wasm. Notes: * `tinygo test` uses a wasmtime by default, so the Makefile has been updated to switch to wazero. * This implements prefilter node name results with a host callback for the same reason as the status reason: using a host callback allows the guest to control memory allocation. This uses a C-String approach to avoid complexity in marshalling. The same approach is used in http-wasm for header values. Signed-off-by: Adrian Cole <adrian@tetrate.io>
03c1d70
to
d797969
Compare
/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?