我正在尝试使用 Scalene 来分析一些 python 代码。 当我跑步时:
scalene --reduced-profile --html --outfile ./profiling/profile_name_file.html ./profiling/profiling_script.py
我收到两条错误消息:
[1205/174847.087563:错误:elf_dynamic_array_reader.h(64)] 标签不存在 找到[1205/174847.110144:错误:directory_reader_posix.cc(42)] opendir /home/user/.config/google-chrome/崩溃 报告/附件/82a5951a-f981-4d23-badc-a9487b65f7c0:没有这样的文件 或目录 (2)
然后,我进入运行 bash 命令的目录,在
profile.html
文件夹中找到了 profile_name_file.html
,而不是 profiling
。
是的,您使用的是正确的分析器。如here所述,时间线被可视化为sparklines,它们是小折线图。您可以考虑查看 CLI 输出(见下文)或扩展 profiling_script.py 的工作负载以获得更好的观察。