mirror of https://github.com/milvus-io/milvus.git
Expose created time and updated time to querynode metrics (#9738)
Signed-off-by: dragondriver <jiquan.long@zilliz.com>pull/9749/head
parent
cb01f3143a
commit
63ae5bd90c
|
@ -44,8 +44,9 @@ func getSystemInfoMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest,
|
|||
SystemVersion: os.Getenv(metricsinfo.GitCommitEnvKey),
|
||||
DeployMode: os.Getenv(metricsinfo.DeployModeEnvKey),
|
||||
},
|
||||
// TODO(dragondriver): CreatedTime & UpdatedTime, easy but time-costing
|
||||
Type: typeutil.QueryNodeRole,
|
||||
CreatedTime: Params.CreatedTime.String(),
|
||||
UpdatedTime: Params.UpdatedTime.String(),
|
||||
Type: typeutil.QueryNodeRole,
|
||||
},
|
||||
SystemConfigurations: metricsinfo.QueryNodeConfiguration{
|
||||
SearchReceiveBufSize: Params.SearchReceiveBufSize,
|
||||
|
|
|
@ -16,6 +16,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
|
@ -76,6 +77,9 @@ type ParamTable struct {
|
|||
// segcore
|
||||
ChunkRows int64
|
||||
SimdType string
|
||||
|
||||
CreatedTime time.Time
|
||||
UpdatedTime time.Time
|
||||
}
|
||||
|
||||
var Params ParamTable
|
||||
|
|
|
@ -30,6 +30,7 @@ import (
|
|||
"strconv"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
@ -214,6 +215,9 @@ func (node *QueryNode) Start() error {
|
|||
node.Stop()
|
||||
})
|
||||
|
||||
Params.CreatedTime = time.Now()
|
||||
Params.UpdatedTime = time.Now()
|
||||
|
||||
node.UpdateStateCode(internalpb.StateCode_Healthy)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue