-
Notifications
You must be signed in to change notification settings - Fork 893
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
add metrics for scheduler #747
Conversation
e1db154
to
b8445ba
Compare
refer to: #695 (comment) |
Hi @qianjun1993 |
I get it from my side: All metrics
|
I noticed you used the |
6f30d20
to
8ed7dcc
Compare
/assign |
8ed7dcc
to
7a36f66
Compare
ClusterNotReady = "ClusterNotReady" | ||
) | ||
|
||
// BindingSchedule can records a scheduling attempt and the duration |
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.
// BindingSchedule can records a scheduling attempt and the duration | |
// BindingSchedule can record a scheduling attempt and the duration |
pkg/scheduler/scheduler.go
Outdated
var err error | ||
switch s.getScheduleType(key.(string)) { | ||
case FirstSchedule: | ||
err = s.scheduleOne(key.(string)) | ||
klog.Infof("Start scheduling binding(%s)", key.(string)) | ||
metrics.BindingSchedule("FirstSchedule", metrics.SinceInSeconds(start), err) |
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.
Why not use the const FirstSchedule
, like string(FirstSchedule)
?
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.
ok
pkg/scheduler/metrics/metrics.go
Outdated
prometheus.CounterOpts{ | ||
Subsystem: SchedulerSubsystem, | ||
Name: "queue_incoming_bindings_total", | ||
Help: "Number of pods added to scheduling queues by event type.", |
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.
Typo: Number of pods
.
scheduleAttempts.WithLabelValues(result, scheduleType).Inc() | ||
} | ||
|
||
// ScheduleStep can records each scheduling duration |
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.
// ScheduleStep can records each scheduling duration | |
// ScheduleStep can record each scheduling step duration. |
7a36f66
to
72ef4cc
Compare
/lgtm But please resolve the conflicts. |
Signed-off-by: junqian <junqian@tencent.com>
72ef4cc
to
226b48b
Compare
/lgtm /hold |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: RainbowMango 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 |
/hold cancel |
Signed-off-by: junqian junqian@tencent.com
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes First Four part of # 695
Special notes for your reviewer:
Does this PR introduce a user-facing change?: