Skip to content
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

Support EventRecorder #83

Merged
merged 7 commits into from
Jan 14, 2024
Merged

Conversation

Gekko0114
Copy link
Member

@Gekko0114 Gekko0114 commented Dec 6, 2023

What type of PR is this?

/kind feature

Optionally add one or more of the following kinds if applicable:
/kind api-change

What this PR does / why we need it:

Support EventRecorder

Which issue(s) this PR fixes:

Part of #73

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Support EventRecorder

What are the benchmark results of this change?

goos: darwin
goarch: amd64
pkg: sigs.k8s.io/kube-scheduler-wasm-extension/internal/e2e/scheduler
cpu: Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
                                      │  before.txt  │              after.txt               │
                                      │    sec/op    │    sec/op      vs base               │
Example_NodeNumber/Simple/New-4         188.5m ± 10%    200.2m ±  8%        ~ (p=0.485 n=6)
Example_NodeNumber/Simple/Run-4         616.8µ ± 71%    322.9µ ± 24%  -47.64% (p=0.026 n=6)
Example_NodeNumber/Simple_Log/New-4     299.5m ± 31%    210.5m ± 29%        ~ (p=0.093 n=6)
Example_NodeNumber/Simple_Log/Run-4     393.9µ ± 28%    305.7µ ± 18%  -22.38% (p=0.015 n=6)
Example_NodeNumber/Advanced/New-4       258.5m ± 45%    248.6m ± 65%        ~ (p=1.000 n=6)
Example_NodeNumber/Advanced/Run-4       94.82µ ± 33%   129.47µ ± 28%  +36.54% (p=0.015 n=6)
Example_NodeNumber/Advanced_Log/New-4   258.6m ± 13%    299.3m ± 21%        ~ (p=0.132 n=6)
Example_NodeNumber/Advanced_Log/Run-4   99.73µ ± 21%   126.66µ ± 10%  +27.01% (p=0.002 n=6)
geomean                                 7.367m          6.890m         -6.48%

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 6, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 6, 2023
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 10, 2023
@Gekko0114 Gekko0114 force-pushed the eventrecorder branch 3 times, most recently from 08826cb to 9e3fa2e Compare December 11, 2023 15:52
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 12, 2023
@Gekko0114 Gekko0114 force-pushed the eventrecorder branch 3 times, most recently from 5a9aed8 to e50c23f Compare December 13, 2023 14:23
return ""
}

func (t testPod) GetKind() string {
Copy link
Member Author

Choose a reason for hiding this comment

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

ABI doesn't include kind and resouce version. So we return static values here

@Gekko0114 Gekko0114 marked this pull request as ready for review December 17, 2023 05:36
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 17, 2023
@Gekko0114
Copy link
Member Author

/assign @sanposhiho ,

Created a PR. PTAL. Thanks,

@Gekko0114
Copy link
Member Author

/assign
/assign @sanposhiho

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 17, 2023
examples/advanced/plugin/plugin.go Outdated Show resolved Hide resolved
examples/nodenumber/main.go Outdated Show resolved Hide resolved
examples/nodenumber/main.go Outdated Show resolved Hide resolved
scheduler/plugin/host.go Outdated Show resolved Hide resolved
scheduler/plugin/plugin_test.go Outdated Show resolved Hide resolved
@Gekko0114
Copy link
Member Author

@sanposhiho ,
Thanks for your review. Fixed it.
PTAL when you have time (it's not urgent)

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 5, 2024
@Gekko0114
Copy link
Member Author

Hi @sanposhiho @codefromthecrypt
Thanks for your suggestions. Based on the discussion, I removed handle. PTAL when you have time.

@sanposhiho
Copy link
Member

I'm curious to see the benchmark result, can you update your PR description, following the instruction:

<!--
If documentation-only or trivial, just write "N/A". Otherwise, run the following:
1. `make bench-example > before.txt` on the commit prior to your changes
2. `make bench-example > after.txt` on the commit of your changes
3. Paste the output of `benchstat before.txt after.txt` as a code block.
If you haven't yet installed benchstat, it looks like this.
```
$ go install golang.org/x/perf/cmd/benchstat@latest
```
-->

@Gekko0114
Copy link
Member Author

@sanposhiho,
Thanks for your review. PTAL again when you have time.

@Gekko0114
Copy link
Member Author

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jan 13, 2024
Copy link
Member

@sanposhiho sanposhiho left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 14, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Gekko0114, sanposhiho

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 14, 2024
@sanposhiho sanposhiho mentioned this pull request Jan 14, 2024
5 tasks
@k8s-ci-robot k8s-ci-robot merged commit 37b1ea2 into kubernetes-sigs:main Jan 14, 2024
6 checks passed
@Gekko0114 Gekko0114 deleted the eventrecorder branch January 14, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants