RepositoryC++
UB

uber-archive/pyflame

🔥 Pyflame: A Ptracing Profiler For Python. This project is deprecated and not maintained.

3.0ksao
240fork
24issue
4lượt xem

🔥 Pyflame: Profiler ptracing sinh flame graph cho Python

Công cụ profiler Python dùng ptrace, không cần can thiệp code, sinh flame graph trực tiếp.

Pyflame là công cụ profiling hiệu năng cao của Uber, viết bằng C++, dùng hệ thống gọi ptrace(2) của Linux để thu thập dữ liệu gọi hàm Python. Không cần instrument, có thể đính kèm vào tiến trình đang chạy (kể cả ứng dụng dùng uWSGI hoặc đa luồng) để sinh flame graph mà không thay đổi mã nguồn.

✨ Điểm nổi bật

  • Ptrace không instrument: dùng ptrace(2) để lấy stack trace mà không cần sửa code.
  • Hỗ trợ ứng dụng nhúng: có thể profiling trên các trình giải thích Python nhúng như uWSGI.
  • Đa luồng: hỗ trợ profiling toàn bộ chương trình Python đa luồng.
  • Chi phí thấp: overhead nhỏ hơn so với cProfile, an toàn dùng trên môi trường production.
  • Tích hợp flame graph: xuất dữ liệu định dạng tương thích với flamegraph.pl.
  • Cài đặt đa nền tảng: hỗ trợ Debian/Ubuntu, Fedora, Docker.
  • Tùy chọn linh hoạt: hỗ trợ gắn PID, thiết lập tần suất mẫu, xuất file, giới hạn thời gian.

💡 Vì sao đáng chú ý

Pyflame nổi bật so với các công cụ profiler truyền thống như cProfile hay profile bằng chính xác cách tiếp cận: không cần sửa mã nguồn, chạm đến hạn chế của ptrace để lấy stack một cách trực tiếp. Điều này giúp profiling các dịch vụ đang chạy trên production mà không gây gián đoạn. Đặc biệt hữu ích cho việc tối ưu ứng dụng web Python dùng uWSGI hoặc các chương trình đa luồng phức tạp.

Lưu ý: dự án đã không còn được bảo trì.


#Python #Profiler #FlameGraph #Ptrace #OpenSource #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.9k
Dec 1, 2026
RepositoryPython
bregman-arie/devops-exercises

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

87.1k
Dec 27, 2025
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

379.9k
Sep 15, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryPython
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

188.2k
Nov 29, 2026
RepositoryJavaScript
CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

186.6k
Nov 27, 2026
RepositoryPython
Comfy-Org/ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

149.6k
Dec 2, 2026
RepositoryPython
harry0703/MoneyPrinterTurbo

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

147.3k
Dec 1, 2026