Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
9b46f380
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9b46f380
编写于
7月 14, 2014
作者:
G
gyfora
提交者:
Stephan Ewen
8月 18, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[streaming] python script added for performance visualization
上级
81fd2cfe
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
45 addition
and
10 deletion
+45
-10
flink-addons/flink-streaming/src/main/java/eu/stratosphere/streaming/util/PerformanceTimer.java
...java/eu/stratosphere/streaming/util/PerformanceTimer.java
+5
-8
flink-addons/flink-streaming/src/test/java/eu/stratosphere/streaming/util/PerformanceTrackerTest.java
...u/stratosphere/streaming/util/PerformanceTrackerTest.java
+2
-2
flink-addons/flink-streaming/src/test/resources/Performance/PerformanceTracker.py
...ming/src/test/resources/Performance/PerformanceTracker.py
+38
-0
未找到文件。
flink-addons/flink-streaming/src/main/java/eu/stratosphere/streaming/util/PerformanceTimer.java
浏览文件 @
9b46f380
...
...
@@ -20,16 +20,17 @@ public class PerformanceTimer extends PerformanceTracker {
long
timer
;
boolean
millis
;
public
PerformanceTimer
(
String
name
,
int
counterLength
,
int
countInterval
)
{
public
PerformanceTimer
(
String
name
,
int
counterLength
,
int
countInterval
,
boolean
millis
)
{
super
(
name
,
counterLength
,
countInterval
);
this
.
millis
=
millis
;
}
public
PerformanceTimer
(
String
name
)
{
public
PerformanceTimer
(
String
name
,
boolean
millis
)
{
super
(
name
);
this
.
millis
=
millis
;
}
public
void
startTimer
(
boolean
millis
)
{
this
.
millis
=
millis
;
public
void
startTimer
()
{
if
(
millis
)
{
timer
=
System
.
currentTimeMillis
();
}
else
{
...
...
@@ -38,10 +39,6 @@ public class PerformanceTimer extends PerformanceTracker {
}
public
void
startTimer
()
{
startTimer
(
true
);
}
public
void
stopTimer
(
String
label
)
{
if
(
millis
)
{
...
...
flink-addons/flink-streaming/src/test/java/eu/stratosphere/streaming/util/PerformanceTrackerTest.java
浏览文件 @
9b46f380
...
...
@@ -94,9 +94,9 @@ public class PerformanceTrackerTest {
@Test
public
void
testTimer
()
throws
InterruptedException
{
PerformanceTimer
pT
=
new
PerformanceTimer
(
"timer"
);
PerformanceTimer
pT
=
new
PerformanceTimer
(
"timer"
,
true
);
pT
.
startTimer
(
true
);
pT
.
startTimer
();
Thread
.
sleep
(
100
);
pT
.
stopTimer
();
...
...
flink-addons/flink-streaming/src/test/resources/Performance/PerformanceTracker.py
0 → 100755
浏览文件 @
9b46f380
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 30 15:40:17 2014
@author: gyfora
"""
import
matplotlib.pyplot
as
plt
import
pandas
as
pd
import
os
def
plotPerformance
(
csv_dir
):
csv_dir
=
csv_dir
dataframes
=
{}
for
fname
in
os
.
listdir
(
csv_dir
):
if
'.csv'
in
fname
:
df
=
pd
.
read_csv
(
os
.
path
.
join
(
csv_dir
,
fname
),
index_col
=
'Time'
)
speed
=
[
0
]
values
=
list
(
df
.
ix
[:,
0
])
for
i
in
range
(
1
,
len
(
values
)):
speed
.
append
(
float
(
values
[
i
]
-
values
[
i
-
1
])
/
float
(
df
.
index
[
i
]
-
df
.
index
[
i
-
1
]))
df
[
'speed'
]
=
speed
dataframes
[
fname
.
rstrip
(
'.csv'
)]
=
df
plt
.
figure
(
figsize
=
(
12
,
8
),
dpi
=
80
)
plt
.
title
(
'Values'
)
for
name
in
dataframes
.
keys
():
dataframes
[
name
].
ix
[:,
0
].
plot
()
plt
.
legend
(
dataframes
.
keys
())
plt
.
figure
(
figsize
=
(
12
,
8
),
dpi
=
80
)
plt
.
title
(
'dV/dT'
)
for
name
in
dataframes
.
keys
():
dataframes
[
name
].
speed
.
plot
()
plt
.
legend
(
dataframes
.
keys
())
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录