| | |
| | | # 分析L2数据传输时间 |
| | | def analyze_l2_data_transformation(path_): |
| | | with open(path_, 'r', encoding="utf-8") as f: |
| | | while True: |
| | | line = f.readline() |
| | | lines = f.readlines() |
| | | for line in lines: |
| | | if not line: |
| | | break |
| | | try: |
| | |
| | | data = datas[2].split(" - ")[1].strip() |
| | | contents = data.split("#") |
| | | code = contents[0] |
| | | use_time = int(contents[1].strip().split(":")[1]) |
| | | use_time = int(contents[1].strip().split(":")[1].split("-")[-2]) |
| | | l2_data = contents[2] |
| | | l2_data = eval(l2_data) |
| | | max_time_data = None |
| | |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | analyze_l2_data_transformation("D:\\logs\\huaxin_l2\\orderdetail.2023-08-24.log") |
| | | analyze_l2_data_transformation("D:\\logs\\huaxin_l2\\orderdetail.2023-08-29.log") |