From 307df45baf9031b1b5143f300b93962f2e67def8 Mon Sep 17 00:00:00 2001 From: ptlwmhjs9 <2869950691@qq.com> Date: Wed, 18 Sep 2024 19:17:24 +0800 Subject: [PATCH] ADD file via upload --- 查看prof.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 查看prof.py diff --git a/查看prof.py b/查看prof.py new file mode 100644 index 0000000..6f99845 --- /dev/null +++ b/查看prof.py @@ -0,0 +1,8 @@ +import pstats + +# 读取cProfile输出的文件 +prof_file = 'output.prof' +prof_stats = pstats.Stats(prof_file) + +# 打印输出文件的内容 +prof_stats.print_stats() # 打印所有的统计信息 \ No newline at end of file