mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 10:08:42 +08:00
refine grafana metrics for replica selection (#25319)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
efdd71c640
commit
951c312ef9
@ -102,7 +102,7 @@ func (b *LookAsideBalancer) SelectNode(ctx context.Context, availableNodes []int
|
|||||||
}
|
}
|
||||||
|
|
||||||
score := b.calculateScore(cost, executingNQ.Load())
|
score := b.calculateScore(cost, executingNQ.Load())
|
||||||
metrics.ProxyWorkLoadScore.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10)).Observe(score)
|
metrics.ProxyWorkLoadScore.WithLabelValues(strconv.FormatInt(node, 10)).Set(score)
|
||||||
|
|
||||||
if targetNode == -1 || score < targetScore {
|
if targetNode == -1 || score < targetScore {
|
||||||
targetScore = score
|
targetScore = score
|
||||||
|
|||||||
@ -249,14 +249,15 @@ var (
|
|||||||
}, []string{usernameLabelName})
|
}, []string{usernameLabelName})
|
||||||
|
|
||||||
// ProxyWorkLoadScore record the score that measured query node's workload.
|
// ProxyWorkLoadScore record the score that measured query node's workload.
|
||||||
ProxyWorkLoadScore = prometheus.NewHistogramVec(
|
ProxyWorkLoadScore = prometheus.NewGaugeVec(
|
||||||
prometheus.HistogramOpts{
|
prometheus.GaugeOpts{
|
||||||
Namespace: milvusNamespace,
|
Namespace: milvusNamespace,
|
||||||
Subsystem: typeutil.ProxyRole,
|
Subsystem: typeutil.ProxyRole,
|
||||||
Name: "workload_score",
|
Name: "workload_score",
|
||||||
Help: "score that measured query node's workload",
|
Help: "score that measured query node's workload",
|
||||||
Buckets: buckets,
|
}, []string{
|
||||||
}, []string{nodeIDLabelName})
|
nodeIDLabelName,
|
||||||
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
// RegisterProxy registers Proxy metrics
|
// RegisterProxy registers Proxy metrics
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user