Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
5bbc291b
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,发现更多精彩内容 >>
提交
5bbc291b
编写于
8月 26, 2019
作者:
W
wxyu
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'main/branch-0.4.0' into branch-0.4.0
Former-commit-id: 7eec087d6ec54b880b38989cb217e84491001632
上级
63b43a2a
7ed3d0c4
变更
13
展开全部
显示空白变更内容
内联
并排
Showing
13 changed file
with
182 addition
and
146 deletion
+182
-146
ci/jenkinsfile/deploy2staging.groovy
ci/jenkinsfile/deploy2staging.groovy
+1
-1
ci/jenkinsfile/dev_test.groovy
ci/jenkinsfile/dev_test.groovy
+2
-2
ci/jenkinsfile/staging_test.groovy
ci/jenkinsfile/staging_test.groovy
+3
-3
cpp/src/db/DBImpl.cpp
cpp/src/db/DBImpl.cpp
+1
-0
cpp/src/db/meta/SqliteMetaImpl.cpp
cpp/src/db/meta/SqliteMetaImpl.cpp
+0
-1
cpp/src/metrics/MetricBase.h
cpp/src/metrics/MetricBase.h
+1
-1
cpp/src/metrics/PrometheusMetrics.cpp
cpp/src/metrics/PrometheusMetrics.cpp
+18
-7
cpp/src/metrics/PrometheusMetrics.h
cpp/src/metrics/PrometheusMetrics.h
+2
-2
cpp/src/server/grpc_impl/GrpcRequestHandler.cpp
cpp/src/server/grpc_impl/GrpcRequestHandler.cpp
+13
-9
cpp/src/server/grpc_impl/GrpcRequestTask.cpp
cpp/src/server/grpc_impl/GrpcRequestTask.cpp
+109
-88
cpp/src/server/grpc_impl/GrpcRequestTask.h
cpp/src/server/grpc_impl/GrpcRequestTask.h
+30
-30
cpp/unittest/metrics/metricbase_test.cpp
cpp/unittest/metrics/metricbase_test.cpp
+1
-1
cpp/unittest/metrics/prometheus_test.cpp
cpp/unittest/metrics/prometheus_test.cpp
+1
-1
未找到文件。
ci/jenkinsfile/deploy2staging.groovy
浏览文件 @
5bbc291b
...
...
@@ -5,7 +5,7 @@ try {
dir
(
"milvus-helm"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:megasearch/milvus-helm.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
dir
(
"milvus/milvus-gpu"
)
{
sh
"helm install --wait --timeout 300 --set engine.image.repository=
"
zilliz
.
azurecr
.
cn
/milvus/
engine
" --set engine.image.tag=${DOCKER_VERSION} --set expose.type=loadBalancer --name ${env.JOB_NAME}-${env.BUILD_NUMBER} -f ci/values.yaml --namespace milvus-1 --version 0.4.0 ."
sh
"helm install --wait --timeout 300 --set engine.image.repository=
\"zilliz.azurecr.cn/milvus/engine\
" --set engine.image.tag=${DOCKER_VERSION} --set expose.type=loadBalancer --name ${env.JOB_NAME}-${env.BUILD_NUMBER} -f ci/values.yaml --namespace milvus-1 --version 0.4.0 ."
}
}
}
catch
(
exc
)
{
...
...
ci/jenkinsfile/dev_test.groovy
浏览文件 @
5bbc291b
...
...
@@ -3,7 +3,7 @@ timeout(time: 40, unit: 'MINUTES') {
dir
(
"${PROJECT_NAME}_test"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:Test/milvus_test.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
sh
'python3 -m pip install -r requirements.txt'
sh
"pytest . --alluredir=
"
test_out
/dev/
single
/
sqlite
" --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine.milvus-1.svc.cluster.local"
sh
"pytest . --alluredir=
\"test_out/dev/single/sqlite\
" --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine.milvus-1.svc.cluster.local"
}
// mysql database backend test
...
...
@@ -20,7 +20,7 @@ timeout(time: 40, unit: 'MINUTES') {
}
}
dir
(
"${PROJECT_NAME}_test"
)
{
sh
"pytest . --alluredir=
"
test_out
/dev/
single
/
mysql
" --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine.milvus-2.svc.cluster.local"
sh
"pytest . --alluredir=
\"test_out/dev/single/mysql\
" --ip ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine.milvus-2.svc.cluster.local"
}
}
catch
(
exc
)
{
echo
'Milvus Test Failed !'
...
...
ci/jenkinsfile/staging_test.groovy
浏览文件 @
5bbc291b
...
...
@@ -4,7 +4,7 @@ timeout(time: 40, unit: 'MINUTES') {
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${SEMVER}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
"${params.GIT_USER}"
,
url:
"git@192.168.1.105:Test/milvus_test.git"
,
name:
'origin'
,
refspec:
"+refs/heads/${SEMVER}:refs/remotes/origin/${SEMVER}"
]]])
sh
'python3 -m pip install -r requirements.txt'
def
service_ip
=
sh
(
script:
"kubectl get svc --namespace milvus-1 ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine --template \"{{range .status.loadBalancer.ingress}}{{.ip}}{{end}}\""
,
returnStdout:
true
).
trim
()
sh
"pytest . --alluredir=
"
test_out
/staging/
single
/
sqlite
" --ip ${service_ip}"
sh
"pytest . --alluredir=
\"test_out/staging/single/sqlite\
" --ip ${service_ip}"
}
// mysql database backend test
...
...
@@ -17,12 +17,12 @@ timeout(time: 40, unit: 'MINUTES') {
}
dir
(
"milvus-helm"
)
{
dir
(
"milvus/milvus-gpu"
)
{
sh
"helm install --wait --timeout 300 --set engine.image.repository=
"
zilliz
.
azurecr
.
cn
/milvus/
engine
" --set engine.image.tag=${DOCKER_VERSION} --set expose.type=loadBalancer --name ${env.JOB_NAME}-${env.BUILD_NUMBER} -f ci/db_backend/mysql_values.yaml --namespace milvus-2 --version 0.4.0 ."
sh
"helm install --wait --timeout 300 --set engine.image.repository=
\"zilliz.azurecr.cn/milvus/engine\
" --set engine.image.tag=${DOCKER_VERSION} --set expose.type=loadBalancer --name ${env.JOB_NAME}-${env.BUILD_NUMBER} -f ci/db_backend/mysql_values.yaml --namespace milvus-2 --version 0.4.0 ."
}
}
dir
(
"${PROJECT_NAME}_test"
)
{
def
service_ip
=
sh
(
script:
"kubectl get svc --namespace milvus-2 ${env.JOB_NAME}-${env.BUILD_NUMBER}-milvus-gpu-engine --template \"{{range .status.loadBalancer.ingress}}{{.ip}}{{end}}\""
,
returnStdout:
true
).
trim
()
sh
"pytest . --alluredir=
"
test_out
/staging/
single
/
mysql
" --ip ${service_ip}"
sh
"pytest . --alluredir=
\"test_out/staging/single/mysql\
" --ip ${service_ip}"
}
}
catch
(
exc
)
{
echo
'Milvus Test Failed !'
...
...
cpp/src/db/DBImpl.cpp
浏览文件 @
5bbc291b
...
...
@@ -317,6 +317,7 @@ void DBImpl::StartMetricTask() {
int64_t
cache_usage
=
cache
::
CpuCacheMgr
::
GetInstance
()
->
CacheUsage
();
int64_t
cache_total
=
cache
::
CpuCacheMgr
::
GetInstance
()
->
CacheCapacity
();
server
::
Metrics
::
GetInstance
().
CpuCacheUsageGaugeSet
(
cache_usage
*
100
/
cache_total
);
server
::
Metrics
::
GetInstance
().
GpuCacheUsageGaugeSet
();
uint64_t
size
;
Size
(
size
);
server
::
Metrics
::
GetInstance
().
DataFileSizeGaugeSet
(
size
);
...
...
cpp/src/db/meta/SqliteMetaImpl.cpp
浏览文件 @
5bbc291b
...
...
@@ -413,7 +413,6 @@ Status SqliteMetaImpl::DescribeTableIndex(const std::string &table_id, TableInde
auto
groups
=
ConnectorPtr
->
select
(
columns
(
&
TableSchema
::
engine_type_
,
&
TableSchema
::
nlist_
,
&
TableSchema
::
index_file_size_
,
&
TableSchema
::
metric_type_
),
where
(
c
(
&
TableSchema
::
table_id_
)
==
table_id
and
c
(
&
TableSchema
::
state_
)
!=
(
int
)
TableSchema
::
TO_DELETE
));
...
...
cpp/src/metrics/MetricBase.h
浏览文件 @
5bbc291b
...
...
@@ -32,7 +32,7 @@ class MetricsBase{
virtual
void
BuildIndexDurationSecondsHistogramObserve
(
double
value
)
{};
virtual
void
CpuCacheUsageGaugeSet
(
double
value
)
{};
virtual
void
GpuCacheUsageGaugeSet
(
double
value
)
{};
virtual
void
GpuCacheUsageGaugeSet
()
{};
virtual
void
MetaAccessTotalIncrement
(
double
value
=
1
)
{};
virtual
void
MetaAccessDurationSecondsHistogramObserve
(
double
value
)
{};
...
...
cpp/src/metrics/PrometheusMetrics.cpp
浏览文件 @
5bbc291b
...
...
@@ -167,15 +167,26 @@ void PrometheusMetrics::CPUTemperature() {
}
}
void
PrometheusMetrics
::
GpuCacheUsageGaugeSet
(
double
value
)
{
void
PrometheusMetrics
::
GpuCacheUsageGaugeSet
()
{
if
(
!
startup_
)
return
;
int64_t
num_processors
=
server
::
SystemInfo
::
GetInstance
().
num_processor
();
server
::
ConfigNode
&
config
=
server
::
ServerConfig
::
GetInstance
().
GetConfig
(
server
::
CONFIG_CACHE
);
std
::
string
gpu_ids_str
=
config
.
GetValue
(
server
::
CONFIG_GPU_IDS
,
"0,1"
);
for
(
auto
i
=
0
;
i
<
num_processors
;
++
i
)
{
// int gpu_cache_usage = cache::GpuCacheMgr::GetInstance(i)->CacheUsage();
// int gpu_cache_total = cache::GpuCacheMgr::GetInstance(i)->CacheCapacity();
// prometheus::Gauge &gpu_cache = gpu_cache_usage_.Add({{"GPU_Cache", std::to_string(i)}});
// gpu_cache.Set(gpu_cache_usage * 100 / gpu_cache_total);
std
::
vector
<
uint64_t
>
gpu_ids
;
std
::
stringstream
ss
(
gpu_ids_str
);
for
(
int
i
;
ss
>>
i
;)
{
gpu_ids
.
push_back
(
i
);
if
(
ss
.
peek
()
==
','
)
{
ss
.
ignore
();
}
}
for
(
auto
i
=
0
;
i
<
gpu_ids
.
size
();
++
i
)
{
uint64_t
cache_usage
=
cache
::
GpuCacheMgr
::
GetInstance
(
gpu_ids
[
i
])
->
CacheUsage
();
uint64_t
cache_capacity
=
cache
::
GpuCacheMgr
::
GetInstance
(
gpu_ids
[
i
])
->
CacheCapacity
();
prometheus
::
Gauge
&
gpu_cache
=
gpu_cache_usage_
.
Add
({{
"GPU_Cache"
,
std
::
to_string
(
i
)}});
gpu_cache
.
Set
(
cache_usage
*
100
/
cache_capacity
);
}
}
...
...
cpp/src/metrics/PrometheusMetrics.h
浏览文件 @
5bbc291b
...
...
@@ -55,7 +55,7 @@ class PrometheusMetrics: public MetricsBase {
void
IndexFileSizeHistogramObserve
(
double
value
)
override
{
if
(
startup_
)
index_files_size_histogram_
.
Observe
(
value
);};
void
BuildIndexDurationSecondsHistogramObserve
(
double
value
)
override
{
if
(
startup_
)
build_index_duration_seconds_histogram_
.
Observe
(
value
);};
void
CpuCacheUsageGaugeSet
(
double
value
)
override
{
if
(
startup_
)
cpu_cache_usage_gauge_
.
Set
(
value
);};
void
GpuCacheUsageGaugeSet
(
double
value
)
override
;
void
GpuCacheUsageGaugeSet
(
)
override
;
void
MetaAccessTotalIncrement
(
double
value
=
1
)
override
{
if
(
startup_
)
meta_access_total_
.
Increment
(
value
);};
void
MetaAccessDurationSecondsHistogramObserve
(
double
value
)
override
{
if
(
startup_
)
meta_access_duration_seconds_histogram_
.
Observe
(
value
);};
...
...
cpp/src/server/grpc_impl/GrpcRequestHandler.cpp
浏览文件 @
5bbc291b
...
...
@@ -18,7 +18,7 @@ GrpcRequestHandler::CreateTable(::grpc::ServerContext *context,
const
::
milvus
::
grpc
::
TableSchema
*
request
,
::
milvus
::
grpc
::
Status
*
response
)
{
BaseTaskPtr
task_ptr
=
CreateTableTask
::
Create
(
*
request
);
BaseTaskPtr
task_ptr
=
CreateTableTask
::
Create
(
request
);
GrpcRequestScheduler
::
ExecTask
(
task_ptr
,
response
);
return
::
grpc
::
Status
::
OK
;
}
...
...
@@ -52,7 +52,7 @@ GrpcRequestHandler::CreateIndex(::grpc::ServerContext *context,
const
::
milvus
::
grpc
::
IndexParam
*
request
,
::
milvus
::
grpc
::
Status
*
response
)
{
BaseTaskPtr
task_ptr
=
CreateIndexTask
::
Create
(
*
request
);
BaseTaskPtr
task_ptr
=
CreateIndexTask
::
Create
(
request
);
GrpcRequestScheduler
::
ExecTask
(
task_ptr
,
response
);
return
::
grpc
::
Status
::
OK
;
}
...
...
@@ -62,7 +62,7 @@ GrpcRequestHandler::Insert(::grpc::ServerContext *context,
const
::
milvus
::
grpc
::
InsertParam
*
request
,
::
milvus
::
grpc
::
VectorIds
*
response
)
{
BaseTaskPtr
task_ptr
=
InsertTask
::
Create
(
*
request
,
*
response
);
BaseTaskPtr
task_ptr
=
InsertTask
::
Create
(
request
,
response
);
::
milvus
::
grpc
::
Status
grpc_status
;
GrpcRequestScheduler
::
ExecTask
(
task_ptr
,
&
grpc_status
);
response
->
mutable_status
()
->
set_reason
(
grpc_status
.
reason
());
...
...
@@ -76,7 +76,7 @@ GrpcRequestHandler::Search(::grpc::ServerContext *context,
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TopKQueryResult
>
*
writer
)
{
std
::
vector
<
std
::
string
>
file_id_array
;
BaseTaskPtr
task_ptr
=
SearchTask
::
Create
(
*
request
,
file_id_array
,
*
writer
);
BaseTaskPtr
task_ptr
=
SearchTask
::
Create
(
request
,
file_id_array
,
writer
);
::
milvus
::
grpc
::
Status
grpc_status
;
GrpcRequestScheduler
::
ExecTask
(
task_ptr
,
&
grpc_status
);
if
(
grpc_status
.
error_code
()
!=
SERVER_SUCCESS
)
{
...
...
@@ -93,7 +93,11 @@ GrpcRequestHandler::SearchInFiles(::grpc::ServerContext *context,
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TopKQueryResult
>
*
writer
)
{
std
::
vector
<
std
::
string
>
file_id_array
;
BaseTaskPtr
task_ptr
=
SearchTask
::
Create
(
request
->
search_param
(),
file_id_array
,
*
writer
);
for
(
int
i
=
0
;
i
<
request
->
file_id_array_size
();
i
++
)
{
file_id_array
.
push_back
(
request
->
file_id_array
(
i
));
}
::
milvus
::
grpc
::
SearchInFilesParam
*
request_mutable
=
const_cast
<::
milvus
::
grpc
::
SearchInFilesParam
*>
(
request
);
BaseTaskPtr
task_ptr
=
SearchTask
::
Create
(
request_mutable
->
mutable_search_param
(),
file_id_array
,
writer
);
::
milvus
::
grpc
::
Status
grpc_status
;
GrpcRequestScheduler
::
ExecTask
(
task_ptr
,
&
grpc_status
);
if
(
grpc_status
.
error_code
()
!=
SERVER_SUCCESS
)
{
...
...
@@ -109,7 +113,7 @@ GrpcRequestHandler::DescribeTable(::grpc::ServerContext *context,
const
::
milvus
::
grpc
::
TableName
*
request
,
::
milvus
::
grpc
::
TableSchema
*
response
)
{
BaseTaskPtr
task_ptr
=
DescribeTableTask
::
Create
(
request
->
table_name
(),
*
response
);
BaseTaskPtr
task_ptr
=
DescribeTableTask
::
Create
(
request
->
table_name
(),
response
);
::
milvus
::
grpc
::
Status
grpc_status
;
GrpcRequestScheduler
::
ExecTask
(
task_ptr
,
&
grpc_status
);
response
->
mutable_table_name
()
->
mutable_status
()
->
set_error_code
(
grpc_status
.
error_code
());
...
...
@@ -137,7 +141,7 @@ GrpcRequestHandler::ShowTables(::grpc::ServerContext *context,
const
::
milvus
::
grpc
::
Command
*
request
,
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TableName
>
*
writer
)
{
BaseTaskPtr
task_ptr
=
ShowTablesTask
::
Create
(
*
writer
);
BaseTaskPtr
task_ptr
=
ShowTablesTask
::
Create
(
writer
);
::
milvus
::
grpc
::
Status
grpc_status
;
GrpcRequestScheduler
::
ExecTask
(
task_ptr
,
&
grpc_status
);
if
(
grpc_status
.
error_code
()
!=
SERVER_SUCCESS
)
{
...
...
@@ -167,7 +171,7 @@ GrpcRequestHandler::Cmd(::grpc::ServerContext *context,
GrpcRequestHandler
::
DeleteByRange
(
::
grpc
::
ServerContext
*
context
,
const
::
milvus
::
grpc
::
DeleteByRangeParam
*
request
,
::
milvus
::
grpc
::
Status
*
response
)
{
BaseTaskPtr
task_ptr
=
DeleteByRangeTask
::
Create
(
*
request
);
BaseTaskPtr
task_ptr
=
DeleteByRangeTask
::
Create
(
request
);
::
milvus
::
grpc
::
Status
grpc_status
;
GrpcRequestScheduler
::
ExecTask
(
task_ptr
,
&
grpc_status
);
response
->
set_error_code
(
grpc_status
.
error_code
());
...
...
@@ -191,7 +195,7 @@ GrpcRequestHandler::PreloadTable(::grpc::ServerContext *context,
GrpcRequestHandler
::
DescribeIndex
(
::
grpc
::
ServerContext
*
context
,
const
::
milvus
::
grpc
::
TableName
*
request
,
::
milvus
::
grpc
::
IndexParam
*
response
)
{
BaseTaskPtr
task_ptr
=
DescribeIndexTask
::
Create
(
request
->
table_name
(),
*
response
);
BaseTaskPtr
task_ptr
=
DescribeIndexTask
::
Create
(
request
->
table_name
(),
response
);
::
milvus
::
grpc
::
Status
grpc_status
;
GrpcRequestScheduler
::
ExecTask
(
task_ptr
,
&
grpc_status
);
response
->
mutable_table_name
()
->
mutable_status
()
->
set_reason
(
grpc_status
.
reason
());
...
...
cpp/src/server/grpc_impl/GrpcRequestTask.cpp
浏览文件 @
5bbc291b
此差异已折叠。
点击以展开。
cpp/src/server/grpc_impl/GrpcRequestTask.h
浏览文件 @
5bbc291b
...
...
@@ -23,17 +23,17 @@ namespace grpc {
class
CreateTableTask
:
public
GrpcBaseTask
{
public:
static
BaseTaskPtr
Create
(
const
::
milvus
::
grpc
::
TableSchema
&
schema
);
Create
(
const
::
milvus
::
grpc
::
TableSchema
*
schema
);
protected:
explicit
CreateTableTask
(
const
::
milvus
::
grpc
::
TableSchema
&
request
);
CreateTableTask
(
const
::
milvus
::
grpc
::
TableSchema
*
request
);
ServerError
OnExecute
()
override
;
private:
const
::
milvus
::
grpc
::
TableSchema
schema_
;
const
::
milvus
::
grpc
::
TableSchema
*
schema_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
...
...
@@ -58,10 +58,10 @@ private:
class
DescribeTableTask
:
public
GrpcBaseTask
{
public:
static
BaseTaskPtr
Create
(
const
std
::
string
&
table_name
,
::
milvus
::
grpc
::
TableSchema
&
schema
);
Create
(
const
std
::
string
&
table_name
,
::
milvus
::
grpc
::
TableSchema
*
schema
);
protected:
DescribeTableTask
(
const
std
::
string
&
table_name
,
::
milvus
::
grpc
::
TableSchema
&
schema
);
DescribeTableTask
(
const
std
::
string
&
table_name
,
::
milvus
::
grpc
::
TableSchema
*
schema
);
ServerError
OnExecute
()
override
;
...
...
@@ -69,7 +69,7 @@ protected:
private:
std
::
string
table_name_
;
::
milvus
::
grpc
::
TableSchema
&
schema_
;
::
milvus
::
grpc
::
TableSchema
*
schema_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
...
...
@@ -94,76 +94,76 @@ private:
class
CreateIndexTask
:
public
GrpcBaseTask
{
public:
static
BaseTaskPtr
Create
(
const
::
milvus
::
grpc
::
IndexParam
&
index_Param
);
Create
(
const
::
milvus
::
grpc
::
IndexParam
*
index_Param
);
protected:
explicit
CreateIndexTask
(
const
::
milvus
::
grpc
::
IndexParam
&
index_Param
);
CreateIndexTask
(
const
::
milvus
::
grpc
::
IndexParam
*
index_Param
);
ServerError
OnExecute
()
override
;
private:
::
milvus
::
grpc
::
IndexParam
index_param_
;
const
::
milvus
::
grpc
::
IndexParam
*
index_param_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class
ShowTablesTask
:
public
GrpcBaseTask
{
public:
static
BaseTaskPtr
Create
(
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TableName
>
&
writer
);
Create
(
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TableName
>
*
writer
);
protected:
explicit
ShowTablesTask
(
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TableName
>
&
writer
);
ShowTablesTask
(
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TableName
>
*
writer
);
ServerError
OnExecute
()
override
;
private:
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TableName
>
writer_
;
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TableName
>
*
writer_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class
InsertTask
:
public
GrpcBaseTask
{
public:
static
BaseTaskPtr
Create
(
const
::
milvus
::
grpc
::
InsertParam
&
insert_Param
,
::
milvus
::
grpc
::
VectorIds
&
record_ids_
);
Create
(
const
::
milvus
::
grpc
::
InsertParam
*
insert_Param
,
::
milvus
::
grpc
::
VectorIds
*
record_ids_
);
protected:
InsertTask
(
const
::
milvus
::
grpc
::
InsertParam
&
insert_Param
,
::
milvus
::
grpc
::
VectorIds
&
record_ids_
);
InsertTask
(
const
::
milvus
::
grpc
::
InsertParam
*
insert_Param
,
::
milvus
::
grpc
::
VectorIds
*
record_ids_
);
ServerError
OnExecute
()
override
;
private:
const
::
milvus
::
grpc
::
InsertParam
insert_param_
;
::
milvus
::
grpc
::
VectorIds
&
record_ids_
;
const
::
milvus
::
grpc
::
InsertParam
*
insert_param_
;
::
milvus
::
grpc
::
VectorIds
*
record_ids_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class
SearchTask
:
public
GrpcBaseTask
{
public:
static
BaseTaskPtr
Create
(
const
::
milvus
::
grpc
::
SearchParam
&
search_param
,
Create
(
const
::
milvus
::
grpc
::
SearchParam
*
search_param
,
const
std
::
vector
<
std
::
string
>
&
file_id_array
,
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TopKQueryResult
>
&
writer
);
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TopKQueryResult
>
*
writer
);
protected:
SearchTask
(
const
::
milvus
::
grpc
::
SearchParam
&
search_param
,
SearchTask
(
const
::
milvus
::
grpc
::
SearchParam
*
search_param
,
const
std
::
vector
<
std
::
string
>
&
file_id_array
,
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TopKQueryResult
>
&
writer
);
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TopKQueryResult
>
*
writer
);
ServerError
OnExecute
()
override
;
private:
const
::
milvus
::
grpc
::
SearchParam
search_param_
;
const
::
milvus
::
grpc
::
SearchParam
*
search_param_
;
std
::
vector
<
std
::
string
>
file_id_array_
;
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TopKQueryResult
>
writer_
;
::
grpc
::
ServerWriter
<::
milvus
::
grpc
::
TopKQueryResult
>
*
writer_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
...
...
@@ -204,16 +204,16 @@ private:
class
DeleteByRangeTask
:
public
GrpcBaseTask
{
public:
static
BaseTaskPtr
Create
(
const
::
milvus
::
grpc
::
DeleteByRangeParam
&
delete_by_range_param
);
Create
(
const
::
milvus
::
grpc
::
DeleteByRangeParam
*
delete_by_range_param
);
protected:
DeleteByRangeTask
(
const
::
milvus
::
grpc
::
DeleteByRangeParam
&
delete_by_range_param
);
DeleteByRangeTask
(
const
::
milvus
::
grpc
::
DeleteByRangeParam
*
delete_by_range_param
);
ServerError
OnExecute
()
override
;
private:
::
milvus
::
grpc
::
DeleteByRangeParam
delete_by_range_param_
;
const
::
milvus
::
grpc
::
DeleteByRangeParam
*
delete_by_range_param_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
...
...
@@ -237,18 +237,18 @@ class DescribeIndexTask : public GrpcBaseTask {
public:
static
BaseTaskPtr
Create
(
const
std
::
string
&
table_name
,
::
milvus
::
grpc
::
IndexParam
&
index_param
);
::
milvus
::
grpc
::
IndexParam
*
index_param
);
protected:
DescribeIndexTask
(
const
std
::
string
&
table_name
,
::
milvus
::
grpc
::
IndexParam
&
index_param
);
::
milvus
::
grpc
::
IndexParam
*
index_param
);
ServerError
OnExecute
()
override
;
private:
std
::
string
table_name_
;
::
milvus
::
grpc
::
IndexParam
&
index_param_
;
::
milvus
::
grpc
::
IndexParam
*
index_param_
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
...
...
cpp/unittest/metrics/metricbase_test.cpp
浏览文件 @
5bbc291b
...
...
@@ -22,7 +22,7 @@ TEST(MetricbaseTest, METRICBASE_TEST){
instance
.
IndexFileSizeHistogramObserve
(
1.0
);
instance
.
BuildIndexDurationSecondsHistogramObserve
(
1.0
);
instance
.
CpuCacheUsageGaugeSet
(
1.0
);
instance
.
GpuCacheUsageGaugeSet
(
1.0
);
instance
.
GpuCacheUsageGaugeSet
();
instance
.
MetaAccessTotalIncrement
();
instance
.
MetaAccessDurationSecondsHistogramObserve
(
1.0
);
instance
.
FaissDiskLoadDurationSecondsHistogramObserve
(
1.0
);
...
...
cpp/unittest/metrics/prometheus_test.cpp
浏览文件 @
5bbc291b
...
...
@@ -23,7 +23,7 @@ TEST(PrometheusTest, PROMETHEUS_TEST){
instance
.
IndexFileSizeHistogramObserve
(
1.0
);
instance
.
BuildIndexDurationSecondsHistogramObserve
(
1.0
);
instance
.
CpuCacheUsageGaugeSet
(
1.0
);
instance
.
GpuCacheUsageGaugeSet
(
1.0
);
instance
.
GpuCacheUsageGaugeSet
();
instance
.
MetaAccessTotalIncrement
();
instance
.
MetaAccessDurationSecondsHistogramObserve
(
1.0
);
instance
.
FaissDiskLoadDurationSecondsHistogramObserve
(
1.0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录