pycallgraph

pycallgraph is a Python module that creates call graphs for Python programs.

  • 所有者: gak/pycallgraph
  • 平台:
  • 许可证: GNU General Public License v2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

.. image:: http://unmaintained.tech/badge.svg
:target: http://unmaintained.tech/
:alt: No Maintenance Intended

Project Abandoned
#################

Many apologies. I've stopped maintaining this project due to personal time constraints. Blog post <https://geraldkaszuba.com/retiring-projects/>_ with more information.

I'm happy to forward users to any new forks, or to discuss PyPI ownership.

Python Call Graph
#################

Welcome! Python Call Graph is a Python <http://www.python.org>_ module that creates call graph <http://en.wikipedia.org/wiki/Call_graph>_ visualizations for Python applications.

.. image:: https://img.shields.io/travis/gak/pycallgraph.svg
:target: https://travis-ci.org/gak/pycallgraph
.. image:: https://img.shields.io/coveralls/gak/pycallgraph/develop.svg
:target: https://coveralls.io/r/gak/pycallgraph?branch=develop
.. image:: https://img.shields.io/pypi/v/pycallgraph.svg
:target: https://crate.io/packages/pycallgraph/
.. image:: https://img.shields.io/pypi/dm/pycallgraph.svg
:target: https://crate.io/packages/pycallgraph

Screenshots

Click on the images below to see a larger version and the source code that generated them.

.. image:: https://pycallgraph.readthedocs.io/en/develop/_images/basic_thumb.png
:target: https://pycallgraph.readthedocs.io/en/develop/examples/basic.html
.. image:: https://pycallgraph.readthedocs.io/en/develop/_images/regexp_grouped_thumb.png
:target: https://pycallgraph.readthedocs.io/en/develop/examples/regexp_grouped.html
.. image:: https://pycallgraph.readthedocs.io/en/develop/_images/regexp_ungrouped_thumb.png
:target: https://pycallgraph.readthedocs.io/en/develop/examples/regexp_ungrouped.html

Project Status

The latest version is 1.0.1 which was released on 2013-09-17, and is a backwards incompatible from the previous release.

The project lives on GitHub <https://github.com/gak/pycallgraph/#python-call-graph>, where you can report issues <https://github.com/gak/pycallgraph/issues>, contribute to the project by forking the project <https://help.github.com/articles/fork-a-repo>_ then creating a pull request <https://help.github.com/articles/using-pull-requests>, or just browse the source code <https://github.com/gak/pycallgraph/>.

The documentation needs some work stiil. Feel free to contribute :)

Features

  • Support for Python 2.7+ and Python 3.3+.
  • Static visualizations of the call graph using various tools such as Graphviz and Gephi.
  • Execute pycallgraph from the command line or import it in your code.
  • Customisable colors. You can programatically set the colors based on number of calls, time taken, memory usage, etc.
  • Modules can be visually grouped together.
  • Easily extendable to create your own output formats.

Quick Start

Installation is easy as::

pip install pycallgraph

You can either use the command-line interface <https://pycallgraph.readthedocs.io/en/develop/guide/command_line_usage.html>_ for a quick visualization of your Python script, or the pycallgraph module <https://pycallgraph.readthedocs.io/en/develop/api/pycallgraph.html>_ for more fine-grained settings.

The following examples specify graphviz as the outputter, so it's required to be installed. They will generate a file called pycallgraph.png.

The command-line method of running pycallgraph is::

$ pycallgraph graphviz -- ./mypythonscript.py

A simple use of the API is::

from pycallgraph import PyCallGraph
from pycallgraph.output import GraphvizOutput

with PyCallGraph(output=GraphvizOutput()):
    code_to_profile()

Documentation

Feel free to browse the documentation of pycallgraph <https://pycallgraph.readthedocs.io/en/develop/>_ for the usage guide <https://pycallgraph.readthedocs.io/en/develop/guide/index.html>_ and API reference <https://pycallgraph.readthedocs.io/en/develop/api/api.html>_.

主要指标

概览
名称与所有者gak/pycallgraph
主编程语言Python
编程语言Makefile (语言数: 2)
平台
许可证GNU General Public License v2.0
所有者活动
创建于2009-08-11 01:03:55
推送于2024-04-09 02:03:25
最后一次提交2016-09-21 08:23:56
发布数2
最新版本名称1.0.1 (发布于 )
第一版名称1.0.0 (发布于 )
用户参与
星数1.9k
关注者数70
派生数343
提交数287
已启用问题?
问题数157
打开的问题数48
拉请求数18
打开的拉请求数11
关闭的拉请求数6
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?