From aba0821ae515ede073b2f4a2f62b846e5316eb85 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期一, 31 七月 2023 15:36:21 +0800 Subject: [PATCH] 增加些实时参数的缓存 --- l2/l2_data_manager_new.py | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/l2/l2_data_manager_new.py b/l2/l2_data_manager_new.py index 2165ee6..ae4f558 100644 --- a/l2/l2_data_manager_new.py +++ b/l2/l2_data_manager_new.py @@ -246,15 +246,16 @@ if len(datas) > 0: cls.process_add_datas(code, datas, 0, __start_time) else: - lp = LineProfiler() - lp.enable() - lp_wrap = lp(cls.process_add_datas) - lp_wrap(code, datas, 0, __start_time) - output = io.StringIO() - lp.print_stats(stream=output) - lp.disable() - with open(f"/home/logs/profile/{code}_{datas[0]['index']}_{datas[-1]['index']}.txt", 'w') as f: - f.write(output.getvalue()) + pass + # lp = LineProfiler() + # lp.enable() + # lp_wrap = lp(cls.process_add_datas) + # lp_wrap(code, datas, 0, __start_time) + # output = io.StringIO() + # lp.print_stats(stream=output) + # lp.disable() + # with open(f"/home/logs/profile/{code}_{datas[0]['index']}_{datas[-1]['index']}.txt", 'w') as f: + # f.write(output.getvalue()) # lp.dump_stats(f"/home/logs/profile/{code}_{round(t.time() * 1000)}.txt") except Exception as e: print("huaxin L2鏁版嵁澶勭悊寮傚父", code, str(e)) -- Gitblit v1.8.0