Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
b88c62e5
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b88c62e5
编写于
8月 23, 2019
作者:
Y
Yu Kun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove some ref
Former-commit-id: 4fddc980f5c5d6d6712f8befb80a397e2a663ffe
上级
f2e58515
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
17 deletion
+9
-17
cpp/src/db/engine/ExecutionEngineImpl.cpp
cpp/src/db/engine/ExecutionEngineImpl.cpp
+4
-10
cpp/src/db/insert/MemTableFile.cpp
cpp/src/db/insert/MemTableFile.cpp
+1
-3
cpp/src/metrics/Metrics.h
cpp/src/metrics/Metrics.h
+4
-4
未找到文件。
cpp/src/db/engine/ExecutionEngineImpl.cpp
浏览文件 @
b88c62e5
...
...
@@ -116,13 +116,12 @@ Status ExecutionEngineImpl::Serialize() {
}
Status
ExecutionEngineImpl
::
Load
(
bool
to_cache
)
{
double
physical_size
;
server
::
CollectExecutionEngineMetrics
metrics
(
physical_size
);
index_
=
zilliz
::
milvus
::
cache
::
CpuCacheMgr
::
GetInstance
()
->
GetIndex
(
location_
);
bool
already_in_cache
=
(
index_
!=
nullptr
);
if
(
!
index_
)
{
try
{
double
physical_size
=
PhysicalSize
();
server
::
CollectExecutionEngineMetrics
metrics
(
physical_size
);
index_
=
read_index
(
location_
);
ENGINE_LOG_DEBUG
<<
"Disk io from: "
<<
location_
;
}
catch
(
knowhere
::
KnowhereException
&
e
)
{
...
...
@@ -135,14 +134,11 @@ Status ExecutionEngineImpl::Load(bool to_cache) {
if
(
!
already_in_cache
&&
to_cache
)
{
Cache
();
physical_size
=
PhysicalSize
();
}
return
Status
::
OK
();
}
Status
ExecutionEngineImpl
::
CopyToGpu
(
uint64_t
device_id
)
{
double
physical_size
;
server
::
CollectExecutionEngineMetrics
metrics
(
physical_size
);
index_
=
zilliz
::
milvus
::
cache
::
GpuCacheMgr
::
GetInstance
(
device_id
)
->
GetIndex
(
location_
);
bool
already_in_cache
=
(
index_
!=
nullptr
);
if
(
!
index_
)
{
...
...
@@ -159,15 +155,12 @@ Status ExecutionEngineImpl::CopyToGpu(uint64_t device_id) {
if
(
!
already_in_cache
)
{
GpuCache
(
device_id
);
physical_size
=
PhysicalSize
();
}
return
Status
::
OK
();
}
Status
ExecutionEngineImpl
::
CopyToCpu
()
{
double
physical_size
;
server
::
CollectExecutionEngineMetrics
metrics
(
physical_size
);
index_
=
zilliz
::
milvus
::
cache
::
CpuCacheMgr
::
GetInstance
()
->
GetIndex
(
location_
);
bool
already_in_cache
=
(
index_
!=
nullptr
);
if
(
!
index_
)
{
...
...
@@ -184,7 +177,6 @@ Status ExecutionEngineImpl::CopyToCpu() {
if
(
!
already_in_cache
)
{
Cache
();
physical_size
=
PhysicalSize
();
}
return
Status
::
OK
();
}
...
...
@@ -198,6 +190,8 @@ Status ExecutionEngineImpl::Merge(const std::string &location) {
auto
to_merge
=
zilliz
::
milvus
::
cache
::
CpuCacheMgr
::
GetInstance
()
->
GetIndex
(
location
);
if
(
!
to_merge
)
{
try
{
double
physical_size
=
server
::
CommonUtil
::
GetFileSize
(
location
);
server
::
CollectExecutionEngineMetrics
metrics
(
physical_size
);
to_merge
=
read_index
(
location
);
}
catch
(
knowhere
::
KnowhereException
&
e
)
{
ENGINE_LOG_ERROR
<<
e
.
what
();
...
...
cpp/src/db/insert/MemTableFile.cpp
浏览文件 @
b88c62e5
...
...
@@ -80,12 +80,10 @@ bool MemTableFile::IsFull() {
}
Status
MemTableFile
::
Serialize
()
{
size_t
size
;
size_t
size
=
GetCurrentMem
()
;
server
::
CollectSerializeMetrics
metrics
(
size
);
size
=
GetCurrentMem
();
execution_engine_
->
Serialize
();
table_file_schema_
.
file_size_
=
execution_engine_
->
PhysicalSize
();
table_file_schema_
.
row_count_
=
execution_engine_
->
Count
();
...
...
cpp/src/metrics/Metrics.h
浏览文件 @
b88c62e5
...
...
@@ -120,7 +120,7 @@ private:
class
CollectExecutionEngineMetrics
{
public:
CollectExecutionEngineMetrics
(
double
&
physical_size
)
:
physical_size_
(
physical_size
)
{
CollectExecutionEngineMetrics
(
double
physical_size
)
:
physical_size_
(
physical_size
)
{
start_time_
=
METRICS_NOW_TIME
;
}
...
...
@@ -137,12 +137,12 @@ public:
private:
using
TIME_POINT
=
std
::
chrono
::
system_clock
::
time_point
;
TIME_POINT
start_time_
;
double
&
physical_size_
;
double
physical_size_
;
};
class
CollectSerializeMetrics
{
public:
CollectSerializeMetrics
(
size_t
&
size
)
:
size_
(
size
)
{
CollectSerializeMetrics
(
size_t
size
)
:
size_
(
size
)
{
start_time_
=
METRICS_NOW_TIME
;
}
...
...
@@ -154,7 +154,7 @@ public:
private:
using
TIME_POINT
=
std
::
chrono
::
system_clock
::
time_point
;
TIME_POINT
start_time_
;
size_t
&
size_
;
size_t
size_
;
};
class
CollectorAddMetrics
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录