Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
2512dff2
M
milvus
项目概览
milvus
/
milvus
12 个月 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
2512dff2
编写于
3月 04, 2022
作者:
C
cai.zhang
提交者:
GitHub
3月 04, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix misuse of timerecord (#15868)
Signed-off-by:
N
cai.zhang
<
cai.zhang@zilliz.com
>
上级
272a347d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
12 deletion
+17
-12
internal/indexnode/task.go
internal/indexnode/task.go
+6
-4
internal/proxy/channels_time_ticker.go
internal/proxy/channels_time_ticker.go
+4
-2
internal/proxy/impl.go
internal/proxy/impl.go
+3
-2
internal/proxy/task.go
internal/proxy/task.go
+4
-4
未找到文件。
internal/indexnode/task.go
浏览文件 @
2512dff2
...
...
@@ -477,8 +477,9 @@ func (it *IndexBuildTask) buildIndex(ctx context.Context) ([]*storage.Blob, erro
if
err
!=
nil
{
return
nil
,
err
}
it
.
tr
.
Record
(
"index codec serialize done"
)
metrics
.
IndexNodeEncodeIndexFileLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
IndexNodeCfg
.
NodeID
,
10
),
strconv
.
FormatInt
(
it
.
segmentID
,
10
))
.
Observe
(
float64
(
it
.
tr
.
RecordSpan
()))
encodeIndexFileDur
:=
it
.
tr
.
Record
(
"index codec serialize done"
)
metrics
.
IndexNodeEncodeIndexFileLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
IndexNodeCfg
.
NodeID
,
10
),
strconv
.
FormatInt
(
it
.
segmentID
,
10
))
.
Observe
(
float64
(
encodeIndexFileDur
.
Milliseconds
()))
return
serializedIndexBlobs
,
nil
}
...
...
@@ -591,8 +592,9 @@ func (it *IndexBuildTask) Execute(ctx context.Context) error {
it
.
SetState
(
TaskStateRetry
)
return
err
}
metrics
.
IndexNodeSaveIndexFileLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
IndexNodeCfg
.
NodeID
,
10
),
strconv
.
FormatInt
(
it
.
segmentID
,
10
))
.
Observe
(
float64
(
it
.
tr
.
RecordSpan
()))
it
.
tr
.
Record
(
"index file save done"
)
saveIndexFileDur
:=
it
.
tr
.
Record
(
"index file save done"
)
metrics
.
IndexNodeSaveIndexFileLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
IndexNodeCfg
.
NodeID
,
10
),
strconv
.
FormatInt
(
it
.
segmentID
,
10
))
.
Observe
(
float64
(
saveIndexFileDur
.
Milliseconds
()))
it
.
tr
.
Elapse
(
"index building all done"
)
log
.
Info
(
"IndexNode CreateIndex successfully "
,
zap
.
Int64
(
"collect"
,
it
.
collectionID
),
zap
.
Int64
(
"partition"
,
it
.
partitionID
),
zap
.
Int64
(
"segment"
,
it
.
segmentID
))
...
...
internal/proxy/channels_time_ticker.go
浏览文件 @
2512dff2
...
...
@@ -22,6 +22,8 @@ import (
"sync"
"time"
"github.com/milvus-io/milvus/internal/util/timerecord"
"github.com/milvus-io/milvus/internal/metrics"
"go.uber.org/zap"
...
...
@@ -93,13 +95,13 @@ func (ticker *channelsTimeTickerImpl) initCurrents(current Timestamp) {
}
func
(
ticker
*
channelsTimeTickerImpl
)
tick
()
error
{
applyStart
:=
time
.
Now
(
)
tr
:=
timerecord
.
NewTimeRecorder
(
"applyTimestamp"
)
now
,
err
:=
ticker
.
tso
.
AllocOne
()
if
err
!=
nil
{
log
.
Warn
(
"Proxy channelsTimeTickerImpl failed to get ts from tso"
,
zap
.
Error
(
err
))
return
err
}
metrics
.
ProxyApplyTimestampLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
ProxyCfg
.
ProxyID
,
10
))
.
Observe
(
float64
(
t
ime
.
Since
(
applyStart
)
.
Milliseconds
()))
metrics
.
ProxyApplyTimestampLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
ProxyCfg
.
ProxyID
,
10
))
.
Observe
(
float64
(
t
r
.
ElapseSpan
(
)
.
Milliseconds
()))
stats
,
err
:=
ticker
.
getStatisticsFunc
()
if
err
!=
nil
{
...
...
internal/proxy/impl.go
浏览文件 @
2512dff2
...
...
@@ -2535,10 +2535,11 @@ func (node *Proxy) Search(ctx context.Context, request *milvuspb.SearchRequest)
strconv
.
FormatInt
(
qt
.
CollectionID
,
10
),
metrics
.
SearchLabel
,
metrics
.
SuccessLabel
)
.
Inc
()
metrics
.
ProxySearchVectors
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
ProxyCfg
.
ProxyID
,
10
),
strconv
.
FormatInt
(
qt
.
CollectionID
,
10
),
metrics
.
SearchLabel
)
.
Set
(
float64
(
qt
.
result
.
Results
.
NumQueries
))
searchDur
:=
tr
.
ElapseSpan
()
.
Milliseconds
()
metrics
.
ProxySearchLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
ProxyCfg
.
ProxyID
,
10
),
strconv
.
FormatInt
(
qt
.
CollectionID
,
10
),
metrics
.
SearchLabel
)
.
Observe
(
float64
(
tr
.
ElapseSpan
()
.
Milliseconds
()
))
strconv
.
FormatInt
(
qt
.
CollectionID
,
10
),
metrics
.
SearchLabel
)
.
Observe
(
float64
(
searchDur
))
metrics
.
ProxySearchLatencyPerNQ
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
ProxyCfg
.
ProxyID
,
10
),
strconv
.
FormatInt
(
qt
.
CollectionID
,
10
))
.
Observe
(
float64
(
tr
.
ElapseSpan
()
.
Milliseconds
()
)
/
float64
(
qt
.
result
.
Results
.
NumQueries
))
strconv
.
FormatInt
(
qt
.
CollectionID
,
10
))
.
Observe
(
float64
(
searchDur
)
/
float64
(
qt
.
result
.
Results
.
NumQueries
))
return
qt
.
result
,
nil
}
...
...
internal/proxy/task.go
浏览文件 @
2512dff2
...
...
@@ -832,8 +832,8 @@ func (it *insertTask) Execute(ctx context.Context) error {
it
.
result
.
Status
.
Reason
=
err
.
Error
()
return
err
}
metrics
.
ProxySendInsertReqLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
ProxyCfg
.
ProxyID
,
10
),
collectionName
)
.
Observe
(
float64
(
tr
.
RecordSpan
()
.
Milliseconds
())
)
tr
.
Record
(
"send insert request to message stream"
)
sendMsgDur
:=
tr
.
Record
(
"send insert request to message stream"
)
metrics
.
ProxySendInsertReqLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
ProxyCfg
.
ProxyID
,
10
),
collectionName
)
.
Observe
(
float64
(
sendMsgDur
.
Milliseconds
())
)
return
nil
}
...
...
@@ -1488,14 +1488,14 @@ func (st *searchTask) Execute(ctx context.Context) error {
if
err
!=
nil
{
log
.
Debug
(
"proxy"
,
zap
.
String
(
"send search request failed"
,
err
.
Error
()))
}
metrics
.
ProxySendMessageLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
ProxyCfg
.
ProxyID
,
10
),
collectionName
,
metrics
.
SearchLabel
)
.
Observe
(
float64
(
tr
.
RecordSpan
()
.
Milliseconds
()))
st
.
tr
.
Record
(
"send message done"
)
log
.
Debug
(
"proxy sent one searchMsg"
,
zap
.
Int64
(
"collectionID"
,
st
.
CollectionID
),
zap
.
Int64
(
"msgID"
,
tsMsg
.
ID
()),
zap
.
Int
(
"length of search msg"
,
len
(
msgPack
.
Msgs
)),
zap
.
Uint64
(
"timeoutTs"
,
st
.
SearchRequest
.
TimeoutTimestamp
))
tr
.
Record
(
"send search msg to message stream"
)
sendMsgDur
:=
tr
.
Record
(
"send search msg to message stream"
)
metrics
.
ProxySendMessageLatency
.
WithLabelValues
(
strconv
.
FormatInt
(
Params
.
ProxyCfg
.
ProxyID
,
10
),
collectionName
,
metrics
.
SearchLabel
)
.
Observe
(
float64
(
sendMsgDur
.
Milliseconds
()))
return
err
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录