提交 a56f8f7b 编写于 作者: S sunby 提交者: yefu.chen

Add runtime stats in master

Signed-off-by: Nsunby <bingyi.sun@zilliz.com>
上级 e21397d6
......@@ -520,8 +520,9 @@ func (s *Master) DescribeIndexProgress(ctx context.Context, req *internalpb.Desc
mt: s.metaTable,
cv: make(chan error),
},
req: req,
resp: resp,
req: req,
resp: resp,
runtimeStats: s.runtimeStats,
}
if err := s.scheduler.Enqueue(task); err != nil {
......
......@@ -66,6 +66,8 @@ type Master struct {
idAllocator *GlobalIDAllocator
//tso allocator
tsoAllocator *GlobalTSOAllocator
runtimeStats *RuntimeStats
}
func newKVBase(kvRoot string, etcdAddr []string) *etcdkv.EtcdKV {
......@@ -203,8 +205,8 @@ func CreateServer(ctx context.Context) (*Master, error) {
return nil, err
}
runtimeStats := NewRuntimeStats()
m.statProcessor = NewStatsProcessor(metakv, runtimeStats,
m.runtimeStats = NewRuntimeStats()
m.statProcessor = NewStatsProcessor(metakv, m.runtimeStats,
func() (Timestamp, error) { return m.tsoAllocator.AllocOne() },
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册