mirror of https://github.com/milvus-io/milvus.git
pr: https://github.com/milvus-io/milvus/pull/29226 Signed-off-by: lixinguo <xinguo.li@zilliz.com> Co-authored-by: lixinguo <xinguo.li@zilliz.com>pull/29705/head
parent
fc65f01ddd
commit
fcd23e2ec2
|
@ -2480,10 +2480,15 @@ func (node *Proxy) Upsert(ctx context.Context, request *milvuspb.UpsertRequest)
|
|||
setErrorIndex()
|
||||
}
|
||||
|
||||
// UpsertCnt always equals to the number of entities in the request
|
||||
it.result.UpsertCnt = int64(request.NumRows)
|
||||
|
||||
rateCol.Add(internalpb.RateType_DMLUpsert.String(), float64(it.upsertMsg.DeleteMsg.Size()+it.upsertMsg.DeleteMsg.Size()))
|
||||
|
||||
metrics.ProxyFunctionCall.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), method,
|
||||
metrics.SuccessLabel).Inc()
|
||||
successCnt := it.result.UpsertCnt - int64(len(it.result.ErrIndex))
|
||||
metrics.ProxyUpsertVectors.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10)).Add(float64(successCnt))
|
||||
metrics.ProxyMutationLatency.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), metrics.UpsertLabel).Observe(float64(tr.ElapseSpan().Milliseconds()))
|
||||
metrics.ProxyCollectionMutationLatency.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), metrics.UpsertLabel, request.CollectionName).Observe(float64(tr.ElapseSpan().Milliseconds()))
|
||||
|
||||
|
|
|
@ -51,6 +51,15 @@ var (
|
|||
Help: "counter of vectors successfully inserted",
|
||||
}, []string{nodeIDLabelName})
|
||||
|
||||
// ProxyUpsertVectors record the number of vectors upsert successfully.
|
||||
ProxyUpsertVectors = prometheus.NewCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Namespace: milvusNamespace,
|
||||
Subsystem: typeutil.ProxyRole,
|
||||
Name: "upsert_vectors_count",
|
||||
Help: "counter of vectors successfully upserted",
|
||||
}, []string{nodeIDLabelName})
|
||||
|
||||
// ProxySQLatency record the latency of search successfully.
|
||||
ProxySQLatency = prometheus.NewHistogramVec(
|
||||
prometheus.HistogramOpts{
|
||||
|
@ -295,6 +304,7 @@ func RegisterProxy(registry *prometheus.Registry) {
|
|||
registry.MustRegister(ProxyReceivedNQ)
|
||||
registry.MustRegister(ProxySearchVectors)
|
||||
registry.MustRegister(ProxyInsertVectors)
|
||||
registry.MustRegister(ProxyUpsertVectors)
|
||||
|
||||
registry.MustRegister(ProxySQLatency)
|
||||
registry.MustRegister(ProxyCollectionSQLatency)
|
||||
|
|
Loading…
Reference in New Issue