-
Notifications
You must be signed in to change notification settings - Fork 962
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: jessestutler <chenzicong4@huawei.com>
- Loading branch information
1 parent
2c3ab7b
commit 55e2388
Showing
10 changed files
with
171 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package metrics | ||
|
||
import ( | ||
"github.com/prometheus/client_golang/prometheus" | ||
"github.com/prometheus/client_golang/prometheus/promauto" | ||
|
||
"volcano.sh/volcano/pkg/scheduler/metrics" | ||
) | ||
|
||
var ( | ||
pgPendingPhaseNum = promauto.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Subsystem: metrics.VolcanoNamespace, | ||
Name: "podgroup_pending_phase_num", | ||
Help: "Number of podgroup at pending phase", | ||
}, []string{"queue_name"}, | ||
) | ||
|
||
pgRunningPhaseNum = promauto.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Subsystem: metrics.VolcanoNamespace, | ||
Name: "podgroup_running_phase_num", | ||
Help: "Number of podgroup at running phase", | ||
}, []string{"queue_name"}, | ||
) | ||
|
||
pgUnknownPhaseNum = promauto.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Subsystem: metrics.VolcanoNamespace, | ||
Name: "podgroup_unknown_phase_num", | ||
Help: "Number of podgroup at unknown phase", | ||
}, []string{"queue_name"}, | ||
) | ||
|
||
pgInqueuePhaseNum = promauto.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Subsystem: metrics.VolcanoNamespace, | ||
Name: "podgroup_inqueue_phase_num", | ||
Help: "Number of podgroup at inqueue phase", | ||
}, []string{"queue_name"}, | ||
) | ||
|
||
pgCompletedPhaseNum = promauto.NewGaugeVec( | ||
prometheus.GaugeOpts{ | ||
Subsystem: metrics.VolcanoNamespace, | ||
Name: "podgroup_completed_phase_num", | ||
Help: "Number of podgroup at completed phase", | ||
}, []string{"queue_name"}, | ||
) | ||
) | ||
|
||
// UpdatePgPendingPhaseNum recored the num of podgroups at pending state in queue | ||
func UpdatePgPendingPhaseNum(queueName string, num float64) { | ||
pgPendingPhaseNum.WithLabelValues(queueName).Set(num) | ||
} | ||
|
||
// UpdatePgRunningPhaseNum recored the num of podgroups at running state in queue | ||
func UpdatePgRunningPhaseNum(queueName string, num float64) { | ||
pgRunningPhaseNum.WithLabelValues(queueName).Set(num) | ||
} | ||
|
||
// UpdatePgUnknownPhaseNum recored the num of podgroups at unknown state in queue | ||
func UpdatePgUnknownPhaseNum(queueName string, num float64) { | ||
pgUnknownPhaseNum.WithLabelValues(queueName).Set(num) | ||
} | ||
|
||
// UpdatePgInqueuePhaseNum recored the num of podgroups at inqueue state in queue | ||
func UpdatePgInqueuePhaseNum(queueName string, num float64) { | ||
pgInqueuePhaseNum.WithLabelValues(queueName).Set(num) | ||
} | ||
|
||
// UpdatePgCompletedPhaseNum recored the num of podgroups at completed state in queue | ||
func UpdatePgCompletedPhaseNum(queueName string, num float64) { | ||
pgCompletedPhaseNum.WithLabelValues(queueName).Set(num) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters