-
Notifications
You must be signed in to change notification settings - Fork 638
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
feature: add QPS Burst flags for client cfg #980
feature: add QPS Burst flags for client cfg #980
Conversation
googs1025
commented
Oct 27, 2024
- add QPS Burst flags for client cfg
/kind feature |
@@ -74,7 +74,8 @@ func NewClientOrDie(npdo *options.NodeProblemDetectorOptions) Client { | |||
} | |||
|
|||
cfg.UserAgent = fmt.Sprintf("%s/%s", filepath.Base(os.Args[0]), version.Version()) | |||
// TODO(random-liu): Set QPS Limit | |||
cfg.QPS = float32(npdo.QPS) |
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.
can we just make npdo.QPS
as float32
?
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.
thanks for reply. :)
The flag package currently only seems to provide float64 types. If we want to directly support float32, we need to implement the interface or use another package. For these reasons, I think simple type conversion is more concise.
FYI: https://pkg.go.dev/flag#Float64
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.
goti t.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyxning, googs1025 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 |