Closed codefromthecrypt closed 9 months ago
cc @anuraaga pretty cool nottinygc runs inside the benchmark runner. So, we can get a realistic performance view (since our main code use nottinygc running bench without it wouldn't be relevant)
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: codefromthecrypt, sanposhiho
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This changes the guest codec benchmarks to actually run in wasm. By using TinyGo with wazero, we can see performance of unmarshal realistically. Before, the benchmarks were run in normal go, even if they used the same library as the guest used.
When you run
make bench
, tinygo compiles the benchmarks to wasm, and then runs that wasm with wazero. So, the console output is coming from wasm functions compiled from Go benchmarks.Our makefile ensures that the wazero version is the same as what the scheduler plugin uses (via go.mod). Since the wazero command configures the module to use real clocks, the performance report should be accurate.
Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:
This doesn't solve for real data yet because I can't get the yaml to proto converter to work in TinyGo. We may want to check in serialized protos as they aren't that big.
Does this PR introduce a user-facing change?
NONE
What are the benchmark results of this change?