跳到正文
Simon Willison·· 1 天前AI 评分32

用 Python 3.15 内置 profiling 工具为 web-edit 生成火焰图与源码热力图

Profiling web-edit with Python 3.15: flame graphs and source heatmaps

AI 导读

用 Python 3.15 内置的 `profiling.sampling` 对未改动的 web-edit 应用做采样分析,发现行尾符保留主导了繁忙的编辑负载:15,296 个 CPU 栈中有 64.8% 出现在 `preserve_endings`,`SequenceMatcher.find_longest_match` 贡献了 38.3% 的叶子样本。

来源:Simon Willison · simonwillison.net