Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
mindinsight
提交
54758ce8
M
mindinsight
项目概览
MindSpore
/
mindinsight
通知
7
Star
3
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindinsight
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
54758ce8
编写于
6月 29, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
6月 29, 2020
浏览文件
操作
浏览文件
下载
差异文件
!394 revert "update the display column name in ui", fix the column name by UI
Merge pull request !394 from chenchao99/profiler_analyser
上级
ae1eb165
a0433c14
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
30 addition
and
52 deletion
+30
-52
mindinsight/profiler/analyser/analyser.py
mindinsight/profiler/analyser/analyser.py
+3
-20
tests/st/func/profiler/test_op_analyser.py
tests/st/func/profiler/test_op_analyser.py
+3
-4
tests/ut/profiler/analyser/test_analyser_aicore_detail.py
tests/ut/profiler/analyser/test_analyser_aicore_detail.py
+12
-14
tests/ut/profiler/analyser/test_analyser_aicore_type.py
tests/ut/profiler/analyser/test_analyser_aicore_type.py
+12
-14
未找到文件。
mindinsight/profiler/analyser/analyser.py
浏览文件 @
54758ce8
...
@@ -34,8 +34,6 @@ class AicoreTypeAnalyser(BaseAnalyser):
...
@@ -34,8 +34,6 @@ class AicoreTypeAnalyser(BaseAnalyser):
ProfilerPathErrorException: If the profiling dir is invalid.
ProfilerPathErrorException: If the profiling dir is invalid.
"""
"""
_col_names
=
[
'op_type'
,
'execution_time'
,
'execution_frequency'
,
'percent'
]
_col_names
=
[
'op_type'
,
'execution_time'
,
'execution_frequency'
,
'percent'
]
_col_names_in_result
=
[
'op_type'
,
'execution_time (ms)'
,
'execution_frequency'
,
'percent'
]
_file_name_aicore_type_time
=
'aicore_intermediate_{}_type.csv'
_file_name_aicore_type_time
=
'aicore_intermediate_{}_type.csv'
def
_load
(
self
):
def
_load
(
self
):
...
@@ -74,7 +72,6 @@ class AicoreTypeAnalyser(BaseAnalyser):
...
@@ -74,7 +72,6 @@ class AicoreTypeAnalyser(BaseAnalyser):
"""
"""
for
item
in
self
.
_result
:
for
item
in
self
.
_result
:
item
[
1
]
=
float
(
format
(
item
[
1
],
'.6f'
))
item
[
1
]
=
float
(
format
(
item
[
1
],
'.6f'
))
self
.
_display_col_names
=
self
.
_col_names_in_result
[:]
return
super
().
_organize_query_result
()
return
super
().
_organize_query_result
()
def
_convert_field_type
(
self
,
row
):
def
_convert_field_type
(
self
,
row
):
...
@@ -104,8 +101,6 @@ class AicoreDetailAnalyser(BaseAnalyser):
...
@@ -104,8 +101,6 @@ class AicoreDetailAnalyser(BaseAnalyser):
"""
"""
_col_names
=
[
'op_name'
,
'op_type'
,
'avg_execution_time'
,
'subgraph'
,
_col_names
=
[
'op_name'
,
'op_type'
,
'avg_execution_time'
,
'subgraph'
,
'full_op_name'
,
'op_info'
]
'full_op_name'
,
'op_info'
]
_col_names_in_result
=
[
'op_name'
,
'op_type'
,
'avg_execution_time (ms)'
,
'subgraph'
,
'full_op_name'
,
'op_info'
]
_file_name_aicore_detail_time
=
'aicore_intermediate_{}_detail.csv'
_file_name_aicore_detail_time
=
'aicore_intermediate_{}_detail.csv'
_file_name_framework_info
=
'framework_raw_{}.csv'
_file_name_framework_info
=
'framework_raw_{}.csv'
...
@@ -231,11 +226,11 @@ class AicoreDetailAnalyser(BaseAnalyser):
...
@@ -231,11 +226,11 @@ class AicoreDetailAnalyser(BaseAnalyser):
is_display_full_op_name (bool): Whether to display the operator full
is_display_full_op_name (bool): Whether to display the operator full
name.
name.
"""
"""
self
.
_display_col_names
=
self
.
_col_names
_in_result
[
0
:
4
]
self
.
_display_col_names
=
self
.
_col_names
[
0
:
4
]
if
is_display_full_op_name
:
if
is_display_full_op_name
:
self
.
_display_col_names
.
append
(
self
.
_col_names
_in_result
[
4
])
self
.
_display_col_names
.
append
(
self
.
_col_names
[
4
])
if
is_display_detail
:
if
is_display_detail
:
self
.
_display_col_names
.
append
(
self
.
_col_names
_in_result
[
5
])
self
.
_display_col_names
.
append
(
self
.
_col_names
[
5
])
def
_convert_framework_field_type
(
self
,
row
):
def
_convert_framework_field_type
(
self
,
row
):
"""
"""
...
@@ -280,8 +275,6 @@ class AicpuAnalyser(BaseAnalyser):
...
@@ -280,8 +275,6 @@ class AicpuAnalyser(BaseAnalyser):
"""
"""
_col_names
=
[
'serial_number'
,
'op_type'
,
'total_time'
,
'dispatch_time'
,
_col_names
=
[
'serial_number'
,
'op_type'
,
'total_time'
,
'dispatch_time'
,
'run_start'
,
'run_end'
]
'run_start'
,
'run_end'
]
_col_names_in_result
=
[
'serial_number'
,
'op_type'
,
'total_time (ms)'
,
'dispatch_time (ms)'
,
'run_start'
,
'run_end'
]
_file_name_aicpu_time
=
'aicpu_intermediate_{}.csv'
_file_name_aicpu_time
=
'aicpu_intermediate_{}.csv'
def
_load
(
self
):
def
_load
(
self
):
...
@@ -312,16 +305,6 @@ class AicpuAnalyser(BaseAnalyser):
...
@@ -312,16 +305,6 @@ class AicpuAnalyser(BaseAnalyser):
return
self
.
_default_filter
(
item
,
filter_condition
)
return
self
.
_default_filter
(
item
,
filter_condition
)
self
.
_result
=
list
(
filter
(
_inner_filter
,
self
.
_data
))
self
.
_result
=
list
(
filter
(
_inner_filter
,
self
.
_data
))
def
_organize_query_result
(
self
):
"""
Organize the query result.
Returns:
dict, the query result.
"""
self
.
_display_col_names
=
self
.
_col_names_in_result
[:]
return
super
().
_organize_query_result
()
def
_convert_field_type
(
self
,
row
):
def
_convert_field_type
(
self
,
row
):
"""
"""
Convert the field type to the specific type.
Convert the field type to the specific type.
...
...
tests/st/func/profiler/test_op_analyser.py
浏览文件 @
54758ce8
...
@@ -32,8 +32,7 @@ from tests.ut.profiler import RAW_DATA_BASE
...
@@ -32,8 +32,7 @@ from tests.ut.profiler import RAW_DATA_BASE
OP_GATHER_V2_INFO
=
{
OP_GATHER_V2_INFO
=
{
'col_name'
:
[
'col_name'
:
[
'op_name'
,
'op_type'
,
'avg_execution_time (ms)'
,
'subgraph'
,
'full_op_name'
,
'op_name'
,
'op_type'
,
'avg_execution_time'
,
'subgraph'
,
'full_op_name'
,
'op_info'
'op_info'
],
],
'object'
:
[
'object'
:
[
[
[
...
@@ -125,7 +124,7 @@ class TestOpAnalyser:
...
@@ -125,7 +124,7 @@ class TestOpAnalyser:
def
test_query_aicore_type_1
(
self
):
def
test_query_aicore_type_1
(
self
):
"""Test the function of querying AICORE operator type infomation."""
"""Test the function of querying AICORE operator type infomation."""
expect_result
=
{
expect_result
=
{
'col_name'
:
[
'op_type'
,
'execution_time
(ms)
'
,
'execution_frequency'
,
'percent'
],
'col_name'
:
[
'op_type'
,
'execution_time'
,
'execution_frequency'
,
'percent'
],
'object'
:
[
'object'
:
[
[
'UnsortedSegmentSum'
,
44.607826
,
2
,
35.28
],
[
'UnsortedSegmentSum'
,
44.607826
,
2
,
35.28
],
[
'GatherV2'
,
43.155441
,
2
,
34.13
],
[
'GatherV2'
,
43.155441
,
2
,
34.13
],
...
@@ -177,7 +176,7 @@ class TestOpAnalyser:
...
@@ -177,7 +176,7 @@ class TestOpAnalyser:
def
test_query_aicore_type_2
(
self
):
def
test_query_aicore_type_2
(
self
):
"""Test the function of querying AICORE operator type infomation."""
"""Test the function of querying AICORE operator type infomation."""
expect_result
=
{
expect_result
=
{
'col_name'
:
[
'op_type'
,
'execution_time
(ms)
'
,
'execution_frequency'
,
'percent'
],
'col_name'
:
[
'op_type'
,
'execution_time'
,
'execution_frequency'
,
'percent'
],
'object'
:
[
'object'
:
[
[
'MatMul'
,
1.936681
,
15
,
1.53
],
[
'MatMul'
,
1.936681
,
15
,
1.53
],
[
'Mul'
,
1.902949
,
32
,
1.51
]
[
'Mul'
,
1.902949
,
32
,
1.51
]
...
...
tests/ut/profiler/analyser/test_analyser_aicore_detail.py
浏览文件 @
54758ce8
...
@@ -23,8 +23,6 @@ from tests.ut.profiler import PROFILER_DIR
...
@@ -23,8 +23,6 @@ from tests.ut.profiler import PROFILER_DIR
COL_NAMES
=
[
'op_name'
,
'op_type'
,
'avg_execution_time'
,
'subgraph'
,
COL_NAMES
=
[
'op_name'
,
'op_type'
,
'avg_execution_time'
,
'subgraph'
,
'full_op_name'
,
'op_info'
]
'full_op_name'
,
'op_info'
]
COL_NAMES_IN_RESULT
=
[
'op_name'
,
'op_type'
,
'avg_execution_time (ms)'
,
'subgraph'
,
'full_op_name'
,
'op_info'
]
def
get_detail_infos
(
indexes
=
None
,
sort_name
=
None
,
sort_type
=
True
):
def
get_detail_infos
(
indexes
=
None
,
sort_name
=
None
,
sort_type
=
True
):
...
@@ -77,7 +75,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -77,7 +75,7 @@ class TestAicoreDetailAnalyser(TestCase):
def
test_query_success_1
(
self
):
def
test_query_success_1
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_detail_infos
(),
'object'
:
get_detail_infos
(),
'size'
:
10
'size'
:
10
}
}
...
@@ -90,7 +88,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -90,7 +88,7 @@ class TestAicoreDetailAnalyser(TestCase):
def
test_query_success_2
(
self
):
def
test_query_success_2
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_detail_infos
(
indexes
=
[
9
]),
'object'
:
get_detail_infos
(
indexes
=
[
9
]),
'size'
:
1
'size'
:
1
}
}
...
@@ -127,7 +125,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -127,7 +125,7 @@ class TestAicoreDetailAnalyser(TestCase):
def
test_query_success_3
(
self
):
def
test_query_success_3
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_detail_infos
(
sort_name
=
'avg_execution_time'
,
sort_type
=
True
),
'object'
:
get_detail_infos
(
sort_name
=
'avg_execution_time'
,
sort_type
=
True
),
'size'
:
10
'size'
:
10
}
}
...
@@ -141,7 +139,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -141,7 +139,7 @@ class TestAicoreDetailAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_detail_infos
(
sort_name
=
'op_name'
,
sort_type
=
False
),
'object'
:
get_detail_infos
(
sort_name
=
'op_name'
,
sort_type
=
False
),
'size'
:
10
'size'
:
10
}
}
...
@@ -157,7 +155,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -157,7 +155,7 @@ class TestAicoreDetailAnalyser(TestCase):
def
test_query_success_4
(
self
):
def
test_query_success_4
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_detail_infos
(
indexes
=
[
2
,
3
]),
'object'
:
get_detail_infos
(
indexes
=
[
2
,
3
]),
'size'
:
10
'size'
:
10
}
}
...
@@ -171,7 +169,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -171,7 +169,7 @@ class TestAicoreDetailAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
[],
'object'
:
[],
'size'
:
10
'size'
:
10
}
}
...
@@ -187,7 +185,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -187,7 +185,7 @@ class TestAicoreDetailAnalyser(TestCase):
def
test_query_success_5
(
self
):
def
test_query_success_5
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_detail_infos
(
'object'
:
get_detail_infos
(
indexes
=
[
1
,
2
],
sort_name
=
'avg_execution_time'
,
sort_type
=
True
indexes
=
[
1
,
2
],
sort_name
=
'avg_execution_time'
,
sort_type
=
True
),
),
...
@@ -211,7 +209,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -211,7 +209,7 @@ class TestAicoreDetailAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_detail_infos
(
'object'
:
get_detail_infos
(
indexes
=
[
0
,
1
,
2
,
8
],
sort_name
=
'avg_execution_time'
,
sort_type
=
True
indexes
=
[
0
,
1
,
2
,
8
],
sort_name
=
'avg_execution_time'
,
sort_type
=
True
),
),
...
@@ -238,7 +236,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -238,7 +236,7 @@ class TestAicoreDetailAnalyser(TestCase):
detail_infos
=
get_detail_infos
(
indexes
=
[
9
])
detail_infos
=
get_detail_infos
(
indexes
=
[
9
])
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
[
0
:
5
],
'col_name'
:
COL_NAMES
[
0
:
5
],
'object'
:
[
item
[
0
:
5
]
for
item
in
detail_infos
],
'object'
:
[
item
[
0
:
5
]
for
item
in
detail_infos
],
'size'
:
1
'size'
:
1
}
}
...
@@ -254,7 +252,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -254,7 +252,7 @@ class TestAicoreDetailAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
[
0
:
4
],
'col_name'
:
COL_NAMES
[
0
:
4
],
'object'
:
[
item
[
0
:
4
]
for
item
in
detail_infos
],
'object'
:
[
item
[
0
:
4
]
for
item
in
detail_infos
],
'size'
:
1
'size'
:
1
}
}
...
@@ -274,7 +272,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -274,7 +272,7 @@ class TestAicoreDetailAnalyser(TestCase):
"""Test the success of the querying and sorting function by operator type."""
"""Test the success of the querying and sorting function by operator type."""
detail_infos
=
get_detail_infos
(
indexes
=
[
9
,
0
,
2
,
1
,
5
,
3
,
4
])
detail_infos
=
get_detail_infos
(
indexes
=
[
9
,
0
,
2
,
1
,
5
,
3
,
4
])
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
[
0
:
4
],
'col_name'
:
COL_NAMES
[
0
:
4
],
'object'
:
[
item
[
0
:
4
]
for
item
in
detail_infos
]
'object'
:
[
item
[
0
:
4
]
for
item
in
detail_infos
]
}
}
...
@@ -296,7 +294,7 @@ class TestAicoreDetailAnalyser(TestCase):
...
@@ -296,7 +294,7 @@ class TestAicoreDetailAnalyser(TestCase):
"""Test the success of the querying and sorting function by operator type."""
"""Test the success of the querying and sorting function by operator type."""
detail_infos
=
get_detail_infos
(
indexes
=
[
9
,
0
,
2
,
1
,
3
,
4
,
8
,
6
])
detail_infos
=
get_detail_infos
(
indexes
=
[
9
,
0
,
2
,
1
,
3
,
4
,
8
,
6
])
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
[
0
:
4
],
'col_name'
:
COL_NAMES
[
0
:
4
],
'object'
:
[
item
[
0
:
4
]
for
item
in
detail_infos
]
'object'
:
[
item
[
0
:
4
]
for
item
in
detail_infos
]
}
}
...
...
tests/ut/profiler/analyser/test_analyser_aicore_type.py
浏览文件 @
54758ce8
...
@@ -21,8 +21,6 @@ from mindinsight.profiler.analyser.analyser_factory import AnalyserFactory
...
@@ -21,8 +21,6 @@ from mindinsight.profiler.analyser.analyser_factory import AnalyserFactory
from
tests.ut.profiler
import
PROFILER_DIR
from
tests.ut.profiler
import
PROFILER_DIR
COL_NAMES
=
[
'op_type'
,
'execution_time'
,
'execution_frequency'
,
'percent'
]
COL_NAMES
=
[
'op_type'
,
'execution_time'
,
'execution_frequency'
,
'percent'
]
COL_NAMES_IN_RESULT
=
[
'op_type'
,
'execution_time (ms)'
,
'execution_frequency'
,
'percent'
]
def
get_type_infos
(
indexes
=
None
,
sort_name
=
None
,
sort_type
=
True
):
def
get_type_infos
(
indexes
=
None
,
sort_name
=
None
,
sort_type
=
True
):
...
@@ -74,7 +72,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -74,7 +72,7 @@ class TestAicoreTypeAnalyser(TestCase):
def
test_query_success_1
(
self
):
def
test_query_success_1
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(),
'object'
:
get_type_infos
(),
'size'
:
5
'size'
:
5
}
}
...
@@ -88,7 +86,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -88,7 +86,7 @@ class TestAicoreTypeAnalyser(TestCase):
def
test_query_success_2
(
self
):
def
test_query_success_2
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
indexes
=
[
1
]),
'object'
:
get_type_infos
(
indexes
=
[
1
]),
'size'
:
1
'size'
:
1
}
}
...
@@ -103,7 +101,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -103,7 +101,7 @@ class TestAicoreTypeAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
indexes
=
[
0
,
2
,
3
,
4
]),
'object'
:
get_type_infos
(
indexes
=
[
0
,
2
,
3
,
4
]),
'size'
:
4
'size'
:
4
}
}
...
@@ -118,7 +116,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -118,7 +116,7 @@ class TestAicoreTypeAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
indexes
=
[
0
,
1
,
3
]),
'object'
:
get_type_infos
(
indexes
=
[
0
,
1
,
3
]),
'size'
:
3
'size'
:
3
}
}
...
@@ -135,7 +133,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -135,7 +133,7 @@ class TestAicoreTypeAnalyser(TestCase):
def
test_query_success_3
(
self
):
def
test_query_success_3
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
indexes
=
[
1
,
3
]),
'object'
:
get_type_infos
(
indexes
=
[
1
,
3
]),
'size'
:
2
'size'
:
2
}
}
...
@@ -150,7 +148,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -150,7 +148,7 @@ class TestAicoreTypeAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
indexes
=
[
0
,
2
,
4
]),
'object'
:
get_type_infos
(
indexes
=
[
0
,
2
,
4
]),
'size'
:
3
'size'
:
3
}
}
...
@@ -165,7 +163,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -165,7 +163,7 @@ class TestAicoreTypeAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
indexes
=
[
2
,
3
]),
'object'
:
get_type_infos
(
indexes
=
[
2
,
3
]),
'size'
:
2
'size'
:
2
}
}
...
@@ -182,7 +180,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -182,7 +180,7 @@ class TestAicoreTypeAnalyser(TestCase):
def
test_query_success_4
(
self
):
def
test_query_success_4
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
sort_name
=
'op_type'
,
sort_type
=
True
),
'object'
:
get_type_infos
(
sort_name
=
'op_type'
,
sort_type
=
True
),
'size'
:
5
}
'size'
:
5
}
condition
=
{
condition
=
{
...
@@ -195,7 +193,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -195,7 +193,7 @@ class TestAicoreTypeAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
sort_name
=
'execution_time'
,
sort_type
=
False
),
'object'
:
get_type_infos
(
sort_name
=
'execution_time'
,
sort_type
=
False
),
'size'
:
5
'size'
:
5
}
}
...
@@ -211,7 +209,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -211,7 +209,7 @@ class TestAicoreTypeAnalyser(TestCase):
def
test_query_success_5
(
self
):
def
test_query_success_5
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
indexes
=
[
0
,
1
]),
'object'
:
get_type_infos
(
indexes
=
[
0
,
1
]),
'size'
:
5
'size'
:
5
}
}
...
@@ -225,7 +223,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -225,7 +223,7 @@ class TestAicoreTypeAnalyser(TestCase):
self
.
assertDictEqual
(
expect_result
,
result
)
self
.
assertDictEqual
(
expect_result
,
result
)
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
indexes
=
[
3
,
4
]),
'object'
:
get_type_infos
(
indexes
=
[
3
,
4
]),
'size'
:
5
'size'
:
5
}
}
...
@@ -241,7 +239,7 @@ class TestAicoreTypeAnalyser(TestCase):
...
@@ -241,7 +239,7 @@ class TestAicoreTypeAnalyser(TestCase):
def
test_query_success_6
(
self
):
def
test_query_success_6
(
self
):
"""Test the success of the querying function."""
"""Test the success of the querying function."""
expect_result
=
{
expect_result
=
{
'col_name'
:
COL_NAMES
_IN_RESULT
,
'col_name'
:
COL_NAMES
,
'object'
:
get_type_infos
(
'object'
:
get_type_infos
(
indexes
=
[
1
,
3
],
sort_name
=
'execution_time'
,
sort_type
=
True
indexes
=
[
1
,
3
],
sort_name
=
'execution_time'
,
sort_type
=
True
),
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录