Logo

上個主題

test --- Python 回归测试包

下個主題

稽核事件表

此頁面

  • 回報錯誤
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • python logo
  • Python »
  • 3.11.3 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • 除錯與效能分析
  • |

除錯與效能分析¶

這些函式庫幫助你進行 Python 程式開發:除錯器允許你在程式碼中單步 (step) 執行、分析堆疊框 (stack frames) 以及設置中斷點 (breakpoints) 等,效能分析工具執行程式碼並提供關於執行時間的詳細分析,讓你找到程式中的瓶頸 (bottlenecks)。事件稽核 (auditing events) 提供執行時期行為的可見性,否則的話可能需要更侵入性的除錯或修補。

  • 稽核事件表
  • bdb --- 调试器框架
  • faulthandler —— 转储 Python 的跟踪信息
    • 转储跟踪信息
    • 故障处理程序的状态
    • 一定时间后转储跟踪数据。
    • 转储用户信号的跟踪信息。
    • 文件描述符相关话题
    • 範例
  • pdb --- Python 的调试器
    • 调试器命令
  • Python 性能分析器
    • 性能分析器简介
    • 实时用户手册
    • profile 和 cProfile 模块参考
    • Stats 类
    • 什么是确定性性能分析?
    • 限制
    • 校正
    • 使用自定义计时器
  • timeit --- 測量小量程式片段的執行時間
    • 基礎範例
    • Python 接口
    • 命令執行列介面
    • 範例
  • trace —— 跟踪 Python 语句的执行
    • 命令行用法
      • 主要的可选参数
      • 修饰器
      • 过滤器
    • 编程接口
  • tracemalloc --- 跟踪内存分配
    • 範例
      • 显示前10项
      • 计算差异
      • 获取一个内存块的溯源
      • Pretty top
        • Record the current and peak size of all traced memory blocks
    • API
      • 函式
      • DomainFilter
      • 过滤器
      • Frame
      • 快照
      • 统计
      • StatisticDiff
      • 跟踪
      • 回溯

上個主題

test --- Python 回归测试包

下個主題

稽核事件表

此頁面

  • 回報錯誤
  • 顯示原始碼

瀏覽

  • 索引
  • 模組 |
  • 下一頁 |
  • 上一頁 |
  • python logo
  • Python »
  • 3.11.3 Documentation »
  • Python 標準函式庫 (Standard Library) »
  • 除錯與效能分析
  • |
© 版權 2001-2023, Python Software Foundation.
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

The Python Software Foundation is a non-profit corporation. Please donate.

最後更新於 6月 03, 2023。 Found a bug?
使用 Sphinx 4.5.0 建立。