API for outputting different formats from CPython sampling profiler
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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:
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách đọc Lib/profiling/sampling/stack_collector.py và cách xử lý pstats và collapsed-format hiện có được đề cập trong issue. Hãy xem lại cuộc thảo luận Discourse được liên kết trước khi đề xuất một interface cho các collector bên thứ ba; để được coi là hoàn tất sẽ cần có một API đã được thống nhất, ranh giới của các định dạng được hỗ trợ và một kế hoạch cho các ràng buộc về build, kiểm thử và phân phối của CPython.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- performance
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100