API for outputting different formats from CPython sampling profiler
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Feature or enhancement
Proposal:
CPython 3.15 has statistical sampling profiler which currently only supports outputting
- pstats https://docs.python.org/3.15/library/profile.html#pstats.Stats
- collapsed format for flamegraphs https://github.com/python/cpython/blob/8d5c3341c538cd1a4192ca8a1536b2eed4b98c69/Lib/profiling/sampling/stack_collector.py#L24
Since it's still an early stage for the sampling profiler, I thought it would be nice to initiate discussion around how to support multiple different formats from the profiler.
- pprof
- OTel
are the formats that could potentially be added, but supporting those from CPython would introduce dependencies that might complicate building/testing and distributing CPython.
I'd like to suggest that CPython has an interface to support 3rd party collectors. What do you think?
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず Lib/profiling/sampling/stack_collector.py と、issue で参照されている既存の pstats および collapsed-format の処理を読んでください。サードパーティ製 collector のインターフェースを提案する前に、リンク先の Discourse の議論を確認してください。完了とするには、合意された API、サポートする形式の境界、および CPython のビルド、テスト、配布に関する制約への対応計画が必要です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- performance
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100