Skip to content

Commit 8046624

Browse files
MonkeyMonkey
authored andcommitted
no message
1 parent 0668fe8 commit 8046624

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎V1.0/Log_Analysis.py‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
cpu_path = "/Users/monkey/Pictures/performance_test_script/App_cpu_13_36_54.txt"
1212
gc_path = '/Users/monkey/Pictures/performance_test_script/GC_file.txt'
1313
package_name = 'com.alipay.m.portal'
14-
14+
flow_path ='/Users/monkey/Pictures/performance_test_script/NetWorkFile_13_36_54.txt'
1515

1616

1717
def read_log(log_path):
@@ -96,6 +96,18 @@ def Gc_analysis():
9696
# print _gc_free_list
9797
except IndexError:
9898
print "日志文件不完整"
99+
return _gc_free_list,_gc_used_per,_gc_total_time
100+
101+
102+
def flow_analysis():
103+
_flow_list = []
104+
data_list = read_log(flow_path)
105+
try:
106+
for i in xrange(len(data_list)):
107+
_flow_list.append(data_list[i].split(' ')[-1:][0][:-4])
108+
except IndexError:
109+
print "日志不完整"
110+
return _flow_list
99111

100112

101113

@@ -104,4 +116,4 @@ def Gc_analysis():
104116

105117

106118
if __name__=="__main__":
107-
Gc_analysis()
119+
flow_analysis()

0 commit comments

Comments
 (0)