{"id":13466240,"url":"https://github.com/uber-archive/pyflame","last_synced_at":"2025-09-27T08:30:56.862Z","repository":{"id":59318046,"uuid":"65319101","full_name":"uber-archive/pyflame","owner":"uber-archive","description":"🔥 Pyflame: A Ptracing Profiler For Python. This project is deprecated and not maintained.","archived":true,"fork":false,"pushed_at":"2019-12-03T07:08:22.000Z","size":377,"stargazers_count":2989,"open_issues_count":35,"forks_count":243,"subscribers_count":65,"default_branch":"master","last_synced_at":"2025-08-30T03:38:36.942Z","etag":null,"topics":["debian","docker","fedora","flame-charts","profiler","ptrace","python","uwsgi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uber-archive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-09T18:35:37.000Z","updated_at":"2025-08-27T10:22:28.000Z","dependencies_parsed_at":"2022-09-18T10:12:05.179Z","dependency_job_id":null,"html_url":"https://github.com/uber-archive/pyflame","commit_stats":null,"previous_names":["uber/pyflame"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/uber-archive/pyflame","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-archive%2Fpyflame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-archive%2Fpyflame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-archive%2Fpyflame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-archive%2Fpyflame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uber-archive","download_url":"https://codeload.github.com/uber-archive/pyflame/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uber-archive%2Fpyflame/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273997156,"owners_count":25204479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debian","docker","fedora","flame-charts","profiler","ptrace","python","uwsgi"],"created_at":"2024-07-31T15:00:41.409Z","updated_at":"2025-09-27T08:30:56.471Z","avatar_url":"https://github.com/uber-archive.png","language":"C++","readme":"# Pyflame: A Ptracing Profiler For Python\n\n[![Build Status](https://api.travis-ci.org/uber/pyflame.svg?branch=master)](https://travis-ci.org/uber/pyflame) [![Docs Status](https://readthedocs.org/projects/pyflame/badge/?version=latest)](http://pyflame.readthedocs.io/en/latest/?badge=latest) [![COPR Status](https://copr.fedorainfracloud.org/coprs/eklitzke/pyflame/package/pyflame/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/eklitzke/pyflame/)\n\n(This project is deprecated and not maintained.)\n\nPyflame is a high performance profiling tool that\ngenerates [flame graphs](http://www.brendangregg.com/flamegraphs.html) for\nPython. Pyflame is implemented in C++, and uses the\nLinux [ptrace(2)](http://man7.org/linux/man-pages/man2/ptrace.2.html) system\ncall to collect profiling information. It can take snapshots of the Python call\nstack without explicit instrumentation, meaning you can profile a program\nwithout modifying its source code. Pyflame is capable of profiling embedded\nPython interpreters like [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/).\nIt fully supports profiling multi-threaded Python programs.\n\nPyflame usually introduces significantly less overhead than the builtin\n`profile` (or `cProfile`) modules, and emits richer profiling data. The\nprofiling overhead is low enough that you can use it to profile live processes\nin production.\n\n**Full Documentation:** https://pyflame.readthedocs.io\n\n![pyflame](https://cloud.githubusercontent.com/assets/2734/17949703/8ef7d08c-6a0b-11e6-8bbd-41f82086d862.png)\n\n## Quickstart\n\n### Building And Installing\n\nFor Debian/Ubuntu, install the following:\n\n```bash\n# Install build dependencies on Debian or Ubuntu.\nsudo apt-get install autoconf automake autotools-dev g++ pkg-config python-dev python3-dev libtool make\n```\n\nOnce you have the build dependencies installed:\n\n```bash\n./autogen.sh\n./configure\nmake\n```\n\nThe `make` command will produce an executable at `src/pyflame` that you can run\nand use.\n\nOptionally, if you have `virtualenv` installed, you can test the executable you\nproduced using `make check`.\n\n### Using Pyflame\n\nThe full documentation for using Pyflame\nis [here](https://pyflame.readthedocs.io/en/latest/usage.html). But\nhere's a quick guide:\n\n```bash\n# Attach to PID 12345 and profile it for 1 second\npyflame -p 12345\n\n# Attach to PID 768 and profile it for 5 seconds, sampling every 0.01 seconds\npyflame -s 5 -r 0.01 -p 768\n\n# Run py.test against tests/, emitting sample data to prof.txt\npyflame -o prof.txt -t py.test tests/\n```\n\nIn all of these cases you will get flame graph data on stdout (or to a file if\nyou used `-o`). This data is in the format expected by `flamegraph.pl`, which\nyou can find [here](https://github.com/brendangregg/FlameGraph).\n\n## FAQ\n\nThe full FAQ is [here](https://pyflame.readthedocs.io/en/latest/faq.html).\n\n### What's The Deal With (idle) Time?\n\nFull\nanswer\n[here](https://pyflame.readthedocs.io/en/latest/faq.html#what-is-idle-time).\ntl;dr: use the `-x` flag to suppress (idle) output.\n\n### What About These Ptrace Errors?\n\nSee [here](https://pyflame.readthedocs.io/en/latest/faq.html#what-are-these-ptrace-permissions-errors).\n\n### How Do I Profile Threaded Applications?\n\nUse the `--threads` option.\n\n### Is There A Way To Just Dump Stack Traces?\n\nYes, use the `-d` option.\n","funding_links":[],"categories":["C++","调试工具"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber-archive%2Fpyflame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuber-archive%2Fpyflame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuber-archive%2Fpyflame/lists"}