-
Notifications
You must be signed in to change notification settings - Fork 337
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
scheduler: add elastic quota metric #1716
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1716 +/- ##
==========================================
+ Coverage 65.92% 65.98% +0.06%
==========================================
Files 385 386 +1
Lines 41702 41879 +177
==========================================
+ Hits 27490 27635 +145
- Misses 12174 12198 +24
- Partials 2038 2046 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
2205afd
to
b167b46
Compare
) | ||
|
||
var ( | ||
ElasticQuotaSpecMinimum = metrics.NewGaugeVec(&metrics.GaugeOpts{ |
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.
建议把这些指标合并,min/max/sharedweight等都已label形式处理。
) | ||
} | ||
|
||
func ReportMetricsByResourceList(gaugeVec *metrics.GaugeVec, resources corev1.ResourceList, labels map[string]string) { |
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.
这里应该是个Update行为,用Report不是太合适。
} | ||
|
||
func reportResourceMetric(gaugeVec *metrics.GaugeVec, quant int64, resourceName string, basicLabels map[string]string) { | ||
labels := make(map[string]string) |
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.
这里应该不需要再创建一个labels map了。gaugae.With方法不会存储这个map的,所以可以直接复用。
/cc @hormes @xulinfei1996 |
@eahydra: GitHub didn't allow me to request PR reviews from the following users: xulinfei1996. Note that only koordinator-sh members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: chuanyun.lcy <[email protected]>
b167b46
to
8b25e6e
Compare
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hormes 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 |
Ⅰ. Describe what this PR does
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist
make test