Skip to content

jab/vmprof-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VMprof Python client

Build Status on TravisCI Build Status on TeamCity Read The Docs

See https://vmprof.readthedocs.org for up to date info

basic usage:

sudo apt-get install python-dev libdwarf-dev libelfg0-dev libunwind8-dev

pip install vmprof

python -m vmprof

vmprofshow

vmprofshow is a command line tool that comes with VMprof which can read profile files generated by VMprof and produce a nicely formatted output.

Here is an example of how to use:

Run a smallish program which burns CPU cycles (with vmprof enabled):

pypy test/cpuburn.py

This will produce a profile file vmprof_cpuburn.dat.

Now display the profile:

vmprofshow vmprof_cpuburn.dat

You will see a (colored) output:

oberstet@thinkpad-t430s:~/scm/vmprof-python$ vmprofshow vmprof_cpuburn.dat
100.0%  <module>  100.0%  tests/cpuburn.py:1
100.0% .. test  100.0%  tests/cpuburn.py:35
100.0% .... burn  100.0%  tests/cpuburn.py:26
 99.2% ...... _iterate  99.2%  tests/cpuburn.py:19
 97.7% ........ _iterate  98.5%  tests/cpuburn.py:19
 22.9% .......... _next_rand  23.5%  tests/cpuburn.py:14
 22.9% ............ JIT code  100.0%  0x7fa7dba57a10
 74.7% .......... JIT code  76.4%  0x7fa7dba57a10
  0.1% .......... JIT code  0.1%  0x7fa7dba583b0
  0.5% ........ _next_rand  0.5%  tests/cpuburn.py:14
  0.0% ........ JIT code  0.0%  0x7fa7dba583b0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 47.2%
  • C 42.6%
  • C++ 10.2%