Timer unit: 1e-06 s
Total time: 5.50454 s
File: flow_to_trw.py
Function: read_a_file_per_time at line 77
Line
==============================================================
77 @profile
78 def read_a_file_per_time():
79 """
80 fd_ret: file descriptor return from cLib `int open_file(const char *file_name)` function
81 """
82 1 1855 1855.0 0.0 jvmPath = jpype.getDefaultJVMPath();
83 1 862435 862435.0 15.7 jpype.startJVM(jvmPath, "-ea", "-Djava.class.path="+javaClassPath)
84
85 1 10590 10590.0 0.2 javaGenFile = jpype.JClass('AttackerJudge')
86 1 99 99.0 0.0 javaClass = javaGenFile()
87
88 1 92 92.0 0.0 target_filename_list = get_flow_file_name()
89
90 1 152 152.0 0.0 c_so = cdll.LoadLibrary(cLibPath+cLibName)
91
92 2 5 2.5 0.0 for target_filename in target_filename_list:
93 1 5 5.0 0.0 target_filename_c = c_char_p(target_filename)
94 1 46 46.0 0.0 fd = c_so.open_file(target_filename_c)
95
96 1 1315676 1315676.0 23.9 ret = c_so.read_a_file_per_time(fd, target_filename_c)
97 1 3 3.0 0.0 if ret == 0:
98 1 3 3.0 0.0 res_file_name = ResFilePath + target_filename + ResFilePostfix
99 1 48 48.0 0.0 c_so.close_file(fd)
100
101
102 1 1787918 1787918.0 32.5 javaClass.judge_file(target_filename+ResFilePostfix)
103 1 1525618 1525618.0 27.7 javaClass.writeResult(target_filename)
104 else:
105 print "reading error"