diff options
Diffstat (limited to 'src/rssb_statistics/all_len_st.py')
| -rw-r--r-- | src/rssb_statistics/all_len_st.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/rssb_statistics/all_len_st.py b/src/rssb_statistics/all_len_st.py new file mode 100644 index 0000000..6e32518 --- /dev/null +++ b/src/rssb_statistics/all_len_st.py @@ -0,0 +1,17 @@ +import os +import re +import csv +import bisect +# cmd1 = "cat survey.log.2018* | grep \"recv survey\" > survey.recv_survey.log" +# cmd2 = "cat media_expire.log.2018* > media_expire.log" +# os.system(cmd1) +# os.system(cmd2) +breakpoints = [1048576,1310720,1572864,1835008,2097152,3145728,4194304] +st_num = [0,0,0,0,0,0,0,0] + +with open("media_expire.log",'r') as infile: + for line in infile: + line_result = re.split(r",|MID:|media_len:",line) + j = bisect.bisect(breakpoints,int(line_result[6])) + st_num[j]+=1 +print st_num
\ No newline at end of file |
