admin
2025-04-14 8893c2af364324d10c85c1b2a2efc4b6b14a8066
时间统计
2个文件已修改
7 ■■■■■ 已修改文件
main.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
strategy/instant_time_market.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.py
@@ -194,6 +194,7 @@
    # 实时L2买1成交量
    def OnRealTimeBuy1Info(self, code, buy1_info):
        # buy1_info: [买1时间,买1价格, 原始买1量, 实时买1量]
        # 最终的买1为: 原始买1量+实时买1量
        async_log_util.info(logger_debug, f"OnRealTimeBuy1Info:{code}-{buy1_info}")
        # L1DataProcessor.excute_sell_rule(code, buy1_info[3], buy1_info[1], "l2-real")
strategy/instant_time_market.py
@@ -334,9 +334,9 @@
                logger_debug.exception(error)
                logger_debug.error(f"L1处理出错:{current_info}")
        use_time = time.time() - __start_time
        if use_time > 1:
        if use_time > 0.5:
            # 记录超过1s的数据
            async_log_util.info("L1数据处理时间统计:thread-{} 总计用时-{} 平均耗时-{} 最大耗时-{}",
            async_log_util.info(logger_debug, "L1数据处理时间统计:thread-{} 总计用时-{} 平均耗时-{} 最大耗时-{}",
                                tool.get_thread_id(), use_time, sum(use_time_list) / len(use_time_list),
                                max(use_time_list))
@@ -363,7 +363,7 @@
            # 分批处理数据
            ds = []
            total_count = len(current_infos)
            page = 20
            page = 10
            page_size = total_count // page + 1
            for p in range(page):
                temp_list = current_infos[p * page_size:(p + 1) * page_size]