Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
d895f014
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,发现更多精彩内容 >>
提交
d895f014
编写于
9月 11, 2019
作者:
G
groot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine unittest code
Former-commit-id: f43f9c7573da613d4d295705fb53649e9c61a26d
上级
c402a6e3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
11 deletion
+9
-11
cpp/unittest/db/db_tests.cpp
cpp/unittest/db/db_tests.cpp
+2
-2
cpp/unittest/db/mem_test.cpp
cpp/unittest/db/mem_test.cpp
+2
-4
cpp/unittest/db/mysql_db_test.cpp
cpp/unittest/db/mysql_db_test.cpp
+2
-2
cpp/unittest/db/search_test.cpp
cpp/unittest/db/search_test.cpp
+3
-3
未找到文件。
cpp/unittest/db/db_tests.cpp
浏览文件 @
d895f014
...
...
@@ -25,8 +25,8 @@ namespace {
static
const
char
*
TABLE_NAME
=
"test_group"
;
static
constexpr
int64_t
TABLE_DIM
=
256
;
static
constexpr
int64_t
VECTOR_COUNT
=
25000
0
;
static
constexpr
int64_t
INSERT_LOOP
=
1000
0
;
static
constexpr
int64_t
VECTOR_COUNT
=
25000
;
static
constexpr
int64_t
INSERT_LOOP
=
1000
;
static
constexpr
int64_t
SECONDS_EACH_HOUR
=
3600
;
static
constexpr
int64_t
DAY_SECONDS
=
24
*
60
*
60
;
...
...
cpp/unittest/db/mem_test.cpp
浏览文件 @
d895f014
...
...
@@ -24,8 +24,6 @@ namespace {
static
std
::
string
TABLE_NAME
=
"test_group"
;
static
constexpr
int64_t
TABLE_DIM
=
256
;
static
constexpr
int64_t
VECTOR_COUNT
=
250000
;
static
constexpr
int64_t
INSERT_LOOP
=
10000
;
std
::
string
GenTableName
()
{
auto
now
=
std
::
chrono
::
system_clock
::
now
();
...
...
@@ -212,7 +210,7 @@ TEST_F(MemManagerTest2, SERIAL_INSERT_SEARCH_TEST) {
std
::
map
<
int64_t
,
std
::
vector
<
float
>>
search_vectors
;
{
engine
::
IDNumbers
vector_ids
;
int64_t
nb
=
10
24
000
;
int64_t
nb
=
10
0
000
;
std
::
vector
<
float
>
xb
;
BuildVectors
(
nb
,
xb
);
engine
::
Status
status
=
db_
->
InsertVectors
(
TABLE_NAME
,
nb
,
xb
.
data
(),
vector_ids
);
...
...
@@ -224,7 +222,7 @@ TEST_F(MemManagerTest2, SERIAL_INSERT_SEARCH_TEST) {
std
::
mt19937
gen
(
rd
());
std
::
uniform_int_distribution
<
int64_t
>
dis
(
0
,
nb
-
1
);
int64_t
num_query
=
2
0
;
int64_t
num_query
=
1
0
;
for
(
int64_t
i
=
0
;
i
<
num_query
;
++
i
)
{
int64_t
index
=
dis
(
gen
);
std
::
vector
<
float
>
search
;
...
...
cpp/unittest/db/mysql_db_test.cpp
浏览文件 @
d895f014
...
...
@@ -22,8 +22,8 @@ namespace {
static
const
char
*
TABLE_NAME
=
"test_group"
;
static
constexpr
int64_t
TABLE_DIM
=
256
;
static
constexpr
int64_t
VECTOR_COUNT
=
25000
0
;
static
constexpr
int64_t
INSERT_LOOP
=
1000
0
;
static
constexpr
int64_t
VECTOR_COUNT
=
25000
;
static
constexpr
int64_t
INSERT_LOOP
=
1000
;
engine
::
meta
::
TableSchema
BuildTableSchema
()
{
engine
::
meta
::
TableSchema
table_info
;
...
...
cpp/unittest/db/search_test.cpp
浏览文件 @
d895f014
...
...
@@ -288,7 +288,7 @@ TEST(DBSearchTest, PARALLEL_TOPK_TEST) {
DoTopk
(
5
,
10
,
4
,
false
);
DoTopk
(
20005
,
998
,
123
,
true
);
DoTopk
(
9987
,
12
,
10
,
false
);
DoTopk
(
77777
,
1000
,
1
,
false
);
DoTopk
(
5432
,
8899
,
8899
,
true
);
//
DoTopk(9987, 12, 10, false);
//
DoTopk(77777, 1000, 1, false);
//
DoTopk(5432, 8899, 8899, true);
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录