• Stars
    star
    234
  • Rank 171,630 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flamegraph generator for cProfile stats

Flamegraph generator for python's cProfile stats.

Flamegraphs allow to visualize relations between functions in a very compact and understandable manner.

Flameprof solves main problems of built-in cProfile reporting and can replace gprof2dot because later outputs very huge graphs with a lot of noise.

Flameprof works with profile stat files obtained by Profile.dump_stats() call or via direct script profiling:

python -m cProfile -o myscript.prof myscript.py

Install

Via pip:

pip install flameprof

Or you can invoke flameprof.py directly:

python flameprof.py input.prof > output.svg

Native svg (--format=svg)

Native svg features:

  • compact function names with full names in a tooltip
  • precise timings (cumulative and total)
  • call counts (in a tooltip on hover)
  • green bars show stack frames where flameprof starts to guess timing ratios
  • inverted flamegraph to show total time of all calls

Graph width, row height, font size and threshold can be set via appropriate cli options.

flameprof requests.prof > requests.svg

Requests profile

Inverted flamegraph:

Requests profile

(Images are clickable)

Svg generated with flamegraph.pl (--format=log)

Also flameprof can output trace log suitable as input for flamegraph.pl.

You can treat "samples" as microseconds by default (see --log-mult option).

flameprof --format=log requests.prof | flamegraph > requests-flamegraph.svg

Requests profile with flamegraph.pl

(Image is clickable)

More Repositories

1

vial-http

Simple http rest tool for vim
Python
411
star
2

sqlbind

Lightweight text-based SQL parameter binds
Python
109
star
3

snaked

Snaked is dead baby, snaked is dead.
Python
44
star
4

orcsome

Scripting extension for NETWM compliant window managers
Python
28
star
5

grafana-stack

Tiny docker images for graphite, grafana and statsdly
Python
26
star
6

typetrainer

typing tutor trainer
Python
25
star
7

dsq

Dead simple queue using redis
Python
19
star
8

hisser

Fast TSDB backend for graphite
Python
13
star
9

supplement

Python completion framework
Python
10
star
10

vial

A framework to develop plugins for Vim in python
Python
10
star
11

scribes-goodies

Extensions for excellent scribes editor. Attention! I discontinued Scribes's plugin support in favor of own Snaked editor.
Python
9
star
12

vim-babymate256

Port of gtksourceview babymate scheme for 256-color term
Vim Script
8
star
13

dropthesoap

SOAP server and XSD/WSDL modeling framework for python
Python
7
star
14

covador

Python data validation with web in-mind
Python
6
star
15

click-lock

Adds locks and timeouts to click entrypoints
Python
5
star
16

backup

My configs
Python
4
star
17

baito

Lightweight WSGI framework. Explicit thin wrapper around WebOb, Beaker and Routes
Python
4
star
18

awesome-config

My rc.lua and theme.lua
Lua
4
star
19

buildbot_pipeline

Dynamic builders for Buildbot
Python
3
star
20

ffcast

take screencast using ffmpeg
C
3
star
21

vial-python

Python mode for vim using vial framework
Python
2
star
22

swoop

Completely RFC-unaware web scrapper
Python
2
star
23

fmd

File Manager for Dad is a minimalistic keyboard oriented fm.
Python
2
star
24

jeque

Simple job queue with priorities
Python
2
star
25

uxie

PyGtk UX lib
Python
2
star
26

mpd-tag

External tag manager for MPD
Python
2
star
27

smpipi

Simple, flexible and non-restrictive SMPP client for python
Python
2
star
28

gen-cert

Scripts to generate self signed cert with root CA and correct subjectAltName
Shell
2
star
29

gedit-xml-plugin

Provides xml editor with autocomplete, easy navigation and schema validation
Python
2
star
30

pghll

PostgreSql extension compatible with HyperLogLog implementation from java stream-lib
C
2
star
31

wide-telegram

Plugin for chrome based browsers, removes blank paddings around UI on https://web.telegram.org/
CSS
1
star
32

cakeplant

Simple accounting for bread and cake plants
Python
1
star
33

docker-python

A set of tiny alpine-based images for python 2.7, 3.4, 3.5 and 3.6.
Dockerfile
1
star
34

cachel

Fast caches for python
Python
1
star
35

skameyka

Web client for taburet
Python
1
star
36

kushetka

GTK client for taburet applications
1
star
37

statsdly

Simple StatsD server compatible with python3
Python
1
star
38

redis_writer

Fast serializer to pipeline data into redis
Python
1
star
39

taburet

Simple accounting platform based on couchdb
Python
1
star
40

flask-app-template

Simple flask template for HTTP API backend with decoupled business logic, alembic, pytest, sentry, uwsgi, statsd server and docker.
Python
1
star
41

drainhunter

Python memory leaks investigating tool, includes django support
Python
1
star
42

vial-mail

Create address book from maildir and autocomplete addresses for vim
Python
1
star
43

notipy

A minimalistic gtk3 notification daemon written in python.
Python
1
star