Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
55627761
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,发现更多精彩内容 >>
未验证
提交
55627761
编写于
11月 01, 2021
作者:
T
ThreadDao
提交者:
GitHub
11月 01, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[skip ci] Test chaos memory stress querynode (#11018)
Signed-off-by:
N
ThreadDao
<
yufen.zong@zilliz.com
>
上级
b96b7733
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
22 deletion
+14
-22
tests/python_client/chaos/chaos_objects/memory_stress/chaos_querynode_memory_stress.yaml
..._objects/memory_stress/chaos_querynode_memory_stress.yaml
+2
-1
tests/python_client/chaos/test_chaos_memory_stress.py
tests/python_client/chaos/test_chaos_memory_stress.py
+12
-21
未找到文件。
tests/python_client/chaos/chaos_objects/memory_stress/chaos_querynode_memory_stress.yaml
浏览文件 @
55627761
...
@@ -15,4 +15,5 @@ spec:
...
@@ -15,4 +15,5 @@ spec:
stressors
:
stressors
:
memory
:
memory
:
workers
:
4
workers
:
4
size
:
1000MB
size
:
512Mi
\ No newline at end of file
duration
:
5m
\ No newline at end of file
tests/python_client/chaos/test_chaos_memory_stress.py
浏览文件 @
55627761
...
@@ -57,37 +57,28 @@ class TestChaosData:
...
@@ -57,37 +57,28 @@ class TestChaosData:
6. release and reload collection, verify search and query is available
6. release and reload collection, verify search and query is available
expected: after chaos deleted, load, search and query qre both available
expected: after chaos deleted, load, search and query qre both available
"""
"""
c_name
=
cf
.
gen_unique_str
(
'chaos_memory'
)
c_name
=
'chaos_memory_nx6DNW4q'
collection_w
=
construct_from_data
(
c_name
)
collection_w
=
ApiCollectionWrapper
()
collection_w
.
init_collection
(
c_name
)
log
.
debug
(
collection_w
.
schema
)
log
.
debug
(
collection_w
.
schema
)
log
.
debug
(
collection_w
.
_shards_num
)
# apply memory stress
# apply memory stress
apply_memory_stress
(
chaos_yaml
)
#
apply_memory_stress(chaos_yaml)
# wait memory stress
# wait memory stress
sleep
(
constants
.
WAIT_PER_OP
*
2
)
# sleep(constants.WAIT_PER_OP * 2)
# query
collection_w
.
release
()
collection_w
.
load
()
term_expr
=
f
'
{
ct
.
default_int64_field_name
}
in [0, 1, 999, 99]'
t0
=
datetime
.
datetime
.
now
()
query_res
,
_
=
collection_w
.
query
(
term_expr
)
tt
=
datetime
.
datetime
.
now
()
-
t0
log
.
info
(
f
"assert query:
{
tt
}
"
)
assert
len
(
query_res
)
==
4
sleep
(
constants
.
WAIT_PER_OP
*
5
)
# query
# query
collection_w
.
release
()
collection_w
.
release
()
collection_w
.
load
()
collection_w
.
load
()
term_expr
=
f
'
{
ct
.
default_int64_field_name
}
in [0, 1, 999, 99]'
term_expr
=
f
'
{
ct
.
default_int64_field_name
}
in [0, 1, 999, 99]'
t0
=
datetime
.
datetime
.
now
()
for
i
in
range
(
4
):
query_res
,
_
=
collection_w
.
query
(
term_expr
)
t0_query
=
datetime
.
datetime
.
now
()
tt
=
datetime
.
datetime
.
now
()
-
t0
query_res
,
_
=
collection_w
.
query
(
term_expr
)
log
.
info
(
f
"assert query:
{
tt
}
"
)
tt_query
=
datetime
.
datetime
.
now
()
-
t0_query
assert
len
(
query_res
)
==
4
log
.
info
(
f
"
{
i
}
query cost:
{
tt_query
}
"
)
assert
len
(
query_res
)
==
4
@
pytest
.
mark
.
tags
(
CaseLabel
.
L3
)
@
pytest
.
mark
.
tags
(
CaseLabel
.
L3
)
@
pytest
.
mark
.
parametrize
(
'chaos_yaml'
,
get_chaos_yamls
())
@
pytest
.
mark
.
parametrize
(
'chaos_yaml'
,
get_chaos_yamls
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录