Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
ea3239a0
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ea3239a0
编写于
7月 10, 2013
作者:
R
Roman Donchenko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xls-report.py: Added an option to show per-pixel times
上级
5b2dc26f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
73 addition
and
16 deletion
+73
-16
modules/ts/misc/xls-report.py
modules/ts/misc/xls-report.py
+73
-16
未找到文件。
modules/ts/misc/xls-report.py
浏览文件 @
ea3239a0
...
...
@@ -104,6 +104,7 @@ bad_speedup_style = xlwt.easyxf('font: color red', num_format_str='#0.00')
no_speedup_style
=
no_time_style
error_speedup_style
=
xlwt
.
easyxf
(
'pattern: pattern solid, fore_color orange'
)
header_style
=
xlwt
.
easyxf
(
'font: bold true; alignment: horizontal centre, vertical top, wrap True'
)
subheader_style
=
xlwt
.
easyxf
(
'alignment: horizontal centre, vertical top'
)
class
Collector
(
object
):
def
__init__
(
self
,
config_match_func
,
include_unmatched
):
...
...
@@ -193,6 +194,8 @@ def main():
arg_parser
.
add_argument
(
'-c'
,
'--config'
,
metavar
=
'CONF'
,
help
=
'global configuration file'
)
arg_parser
.
add_argument
(
'--include-unmatched'
,
action
=
'store_true'
,
help
=
'include results from XML files that were not recognized by configuration matchers'
)
arg_parser
.
add_argument
(
'--show-times-per-pixel'
,
action
=
'store_true'
,
help
=
'for tests that have an image size parameter, show per-pixel time, as well as total time'
)
args
=
arg_parser
.
parse_args
()
...
...
@@ -246,21 +249,53 @@ def main():
sheet
.
row
(
2
).
height
=
800
sheet
.
panes_frozen
=
True
sheet
.
remove_splits
=
True
sheet
.
horz_split_pos
=
3
sheet
.
horz_split_first_visible
=
3
sheet_comparisons
=
sheet_conf
.
get
(
'comparisons'
,
[])
for
i
,
w
in
enumerate
([
2500
,
10000
,
2500
,
2000
,
7500
]
+
(
len
(
config_names
)
+
1
+
len
(
sheet_comparisons
))
*
[
4000
]):
sheet
.
col
(
i
).
width
=
w
row
=
2
for
i
,
caption
in
enumerate
([
'Module'
,
'Test'
,
'Image
\n
size'
,
'Data
\n
type'
,
'Other parameters'
]
+
config_names
+
[
None
]
+
[
comp
[
'to'
]
+
'
\n
vs
\n
'
+
comp
[
'from'
]
for
comp
in
sheet_comparisons
]):
sheet
.
row
(
2
).
write
(
i
,
caption
,
header_style
)
col
=
0
row
=
3
for
(
w
,
caption
)
in
[
(
2500
,
'Module'
),
(
10000
,
'Test'
),
(
2500
,
'Image
\n
size'
),
(
2000
,
'Data
\n
type'
),
(
7500
,
'Other parameters'
)]:
sheet
.
col
(
col
).
width
=
w
if
args
.
show_times_per_pixel
:
sheet
.
write_merge
(
row
,
row
+
1
,
col
,
col
,
caption
,
header_style
)
else
:
sheet
.
write
(
row
,
col
,
caption
,
header_style
)
col
+=
1
for
config_name
in
config_names
:
if
args
.
show_times_per_pixel
:
sheet
.
col
(
col
).
width
=
3000
sheet
.
col
(
col
+
1
).
width
=
3000
sheet
.
write_merge
(
row
,
row
,
col
,
col
+
1
,
config_name
,
header_style
)
sheet
.
write
(
row
+
1
,
col
,
'total, ms'
,
subheader_style
)
sheet
.
write
(
row
+
1
,
col
+
1
,
'per pixel, ns'
,
subheader_style
)
col
+=
2
else
:
sheet
.
col
(
col
).
width
=
4000
sheet
.
write
(
row
,
col
,
config_name
,
header_style
)
col
+=
1
col
+=
1
# blank column between configurations and comparisons
for
comp
in
sheet_comparisons
:
sheet
.
col
(
col
).
width
=
4000
caption
=
comp
[
'to'
]
+
'
\n
vs
\n
'
+
comp
[
'from'
]
if
args
.
show_times_per_pixel
:
sheet
.
write_merge
(
row
,
row
+
1
,
col
,
col
,
caption
,
header_style
)
else
:
sheet
.
write
(
row
,
col
,
caption
,
header_style
)
row
+=
2
if
args
.
show_times_per_pixel
else
1
sheet
.
horz_split_pos
=
row
sheet
.
horz_split_first_visible
=
row
module_colors
=
sheet_conf
.
get
(
'module_colors'
,
{})
module_styles
=
{
module
:
xlwt
.
easyxf
(
'pattern: pattern solid, fore_color {}'
.
format
(
color
))
...
...
@@ -284,16 +319,36 @@ def main():
del
param_list
[
param_list
.
index
(
data_type
)]
sheet
.
row
(
row
).
write
(
4
,
' | '
.
join
(
param_list
))
for
i
,
c
in
enumerate
(
config_names
):
col
=
5
for
c
in
config_names
:
if
c
in
configs
:
sheet
.
write
(
row
,
5
+
i
,
configs
[
c
],
time_style
)
sheet
.
write
(
row
,
col
,
configs
[
c
],
time_style
)
else
:
sheet
.
write
(
row
,
5
+
i
,
None
,
no_time_style
)
for
i
,
comp
in
enumerate
(
sheet_comparisons
):
sheet
.
write
(
row
,
col
,
None
,
no_time_style
)
col
+=
1
if
args
.
show_times_per_pixel
:
sheet
.
write
(
row
,
col
,
xlwt
.
Formula
(
'''
{0} * 1000000 / (
VALUE(MID({1}; 1; SEARCH("x"; {1}) - 1))
* VALUE(MID({1}; SEARCH("x"; {1}) + 1; LEN({1})))
)
'''
.
replace
(
'
\n
'
,
''
).
replace
(
' '
,
''
).
format
(
xlwt
.
Utils
.
rowcol_to_cell
(
row
,
col
-
1
),
xlwt
.
Utils
.
rowcol_to_cell
(
row
,
2
)
)
),
time_style
)
col
+=
1
col
+=
1
# blank column
for
comp
in
sheet_comparisons
:
cmp_from
=
configs
.
get
(
comp
[
"from"
])
cmp_to
=
configs
.
get
(
comp
[
"to"
])
col
=
5
+
len
(
config_names
)
+
1
+
i
if
isinstance
(
cmp_from
,
numbers
.
Number
)
and
isinstance
(
cmp_to
,
numbers
.
Number
):
try
:
...
...
@@ -306,6 +361,8 @@ def main():
else
:
sheet
.
write
(
row
,
col
,
None
,
no_speedup_style
)
col
+=
1
row
+=
1
if
row
%
1000
==
0
:
sheet
.
flush_row_data
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录