getsentry / getsentry/sentry-python

Investigate profiling with sys.monitoring/PEP 669

Đang mở
#2,683 3 bình luận 3 reaction 0 người được giao Xem trên GitHub
Feature Profiles Python
Ngôn ngữ chính
Python
Star
2.2k
Fork
669
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
213

Mô tả

### Problem Statement

Sentry's built-in profiling is reasonably low-overhead, but it takes a snapshot of the app's stack every ~10ms. This can miss quite a lot of events. Before Python 3.12, implementing a more comprehensive profiler would tank performance and was absolutely cost-prohibitive in production.

### Solution Brainstorm

But since 3.12 we have [PEP 669](https://peps.python.org/pep-0669/) and [sys.monitoring](https://docs.python.org/3/library/sys.monitoring.html), a low(er)-overhead method of getting access to interpreter events. These allow informing a profiler whenever a new interpreter event happens in process. It'd be nice to investigate if this could be used for more granular Python profiling.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.