| | |
| | | :return: |
| | | """ |
| | | if datas: |
| | | logger_debug.debug(f"{code} - L2逐笔成交上报:{len(datas)}") |
| | | # logger_debug.debug(f"{code} - L2逐笔成交上报:{len(datas)}") |
| | | price, time_str = datas[-1][1], huaxin_util.convert_time(datas[-1][3]) |
| | | try: |
| | | # 获取最近的成交价 |
| | |
| | | logger_debug.exception(error) |
| | | logger_debug.error(f"L1处理出错:{current_info}") |
| | | use_time = time.time() - __start_time |
| | | if use_time > 0.5 or True: |
| | | if use_time > 0.5: |
| | | # 记录超过1s的数据 |
| | | async_log_util.info(logger_debug, "L1数据处理时间统计:thread-{} 总计用时-{} 平均耗时-{} 最大耗时-{}", |
| | | tool.get_thread_id(), use_time, sum(use_time_list) / len(use_time_list), |