You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
583 B
30 lines
583 B
2 months ago
|
import cProfile
|
||
|
import pstats
|
||
|
import a_wordcloud
|
||
|
import bvid
|
||
|
import to_allexcel
|
||
|
import to_danmu
|
||
|
import to_excel
|
||
|
|
||
|
def run_all():
|
||
|
a_wordcloud.main()
|
||
|
bvid.main()
|
||
|
to_allexcel.main()
|
||
|
to_danmu.main()
|
||
|
to_excel.main()
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
profiler = cProfile.Profile()
|
||
|
profiler.enable()
|
||
|
|
||
|
run_all()
|
||
|
|
||
|
profiler.disable()
|
||
|
profiler.dump_stats('performance_profile.prof')
|
||
|
|
||
|
# 分析结果
|
||
|
with open('performance_report.txt', 'w') as f:
|
||
|
ps = pstats.Stats(profiler, stream=f)
|
||
|
ps.sort_stats('cumulative')
|
||
|
ps.print_stats()
|