Debugging and profiling
***********************

ここに含まれるライブラリは Python での開発を手助けするものです。デバッ
ガを使うと、コードのステップ実行や、スタックフレームの解析、ブレークポ
イントの設定などができます。プロファイラはコードを実行して実行時間の詳
細を提供し、プログラムのボトルネックを特定できるようにします。

* 監査イベント表

* "bdb" --- デバッガーフレームワーク

* "faulthandler" --- Python トレースバックをダンプする

  * tracebackのダンプ

  * Dumping the C stack

    * C Stack Compatibility

  * フォールトハンドラの状態

  * タイムアウト後にtracebackをダンプする

  * ユーザシグナルに対してtracebackをダンプする

  * ファイル記述子の問題

  * 使用例

* "pdb" --- The Python Debugger

  * コマンドライン・インターフェース

  * Debugger commands

* "profiling" --- Python profilers

  * Introduction to profiling

  * Choosing a profiler

    * When to use statistical sampling

    * When to use deterministic tracing

  * Quick start

    * Statistical profiling

    * Deterministic profiling

  * Understanding profile output

  * Legacy compatibility

    * "profiling.tracing" --- Deterministic profiler

      * What is deterministic profiling?

      * Command-line interface

      * Programmatic usage examples

        * Basic profiling

        * Using the "Profile" class

      * Module reference

      * Using a custom timer

      * Limitations

    * "profiling.sampling" --- Statistical profiler

      * What is statistical profiling?

        * How time is estimated

        * When to use a different approach

      * Quick examples

      * Commands

        * The "run" command

        * The "attach" command

        * The "dump" command

        * The "replay" command

        * Profiling in production

        * Platform requirements

        * Version compatibility

      * Sampling configuration

        * Sampling rate and duration

        * Thread selection

        * Blocking mode

        * Special frames

        * Opcode-aware profiling

        * Real-time statistics

        * Subprocess profiling

        * Sampling efficiency

      * Profiling modes

        * Wall-clock mode

        * CPU mode

        * Comparing wall-clock and CPU profiles

        * GIL mode

        * Exception mode

      * Output formats

        * pstats format

        * Collapsed stacks format

        * Flame graph format

          * Differential flame graphs

        * Gecko format

        * Heatmap format

        * Binary format

      * Record and replay workflow

      * Live mode

        * Keyboard commands

      * Async-aware profiling

        * Async modes

        * Task markers and stack reconstruction

        * Option restrictions

      * Command-line interface

        * Global options

        * Dump options

        * Sampling options

        * Mode options

        * Output options

        * pstats display options

        * Run command options

* "pstats" --- Statistics for profilers

  * Reading and displaying profile data

    * Working with statistics

    * Filtering output

    * Analyzing call relationships

    * Combining multiple profiles

  * The "Stats" class

  * Command-line interface

* "timeit" --- 小さなコードスニペットの実行時間計測

  * Basic examples

  * Python interface

  * コマンドライン・インターフェース

  * 使用例

* "trace" --- Python 文実行のトレースと追跡

  * コマンドラインからの使用

    * 主要なオプション

    * 修飾的オプション

    * フィルターオプション

  * プログラミングインターフェース

* "tracemalloc" --- メモリ割り当ての追跡

  * 使用例

    * 上位10を表示する

    * 差を計算する

    * メモリブロックのトレースバックを取得する

    * top を整形化する

      * Record the current and peak size of all traced memory blocks

  * API

    * 関数

    * DomainFilter

    * Filter

    * Frame

    * Snapshot

    * Statistic

    * StatisticDiff

    * Trace

    * Traceback
