Skip to main content

A module for profiling compiled extensions

Project description

Yep is a tool to profile compiled code (C/C++/Fortran) from the Python interpreter. It uses the google-perftools CPU profiler and depends on pprof (google-pprof on Debian) for visualization.

Install

This package depends on google-perftools (package google-perftools in Debian). Once you have fulfilled these depencies you can install the package with the usual command:

$ python setup.py install

However, since the package one-file distribution, you can also just put yep.py somewhere in your $PYTHONPATH.

Usage

There are various ways to use the profiler. The simplest is add this module as argument to the Python interpreter when running your script and add flag -v to visualize the result:

$ python -m yep -v my_script.py

This will create a file my_script.py.prof that can be analyzed with pprof. Execute python -m yep to get the full list of options.

It is also possible to manually start/stop the profiler from inside Python code:

>>> import yep
>>> yep.start('file_name.prof')
>>> # do your computations
>>> yep.stop()

This will create a file_name.prof to be analized with pperf.

Development

Git repository can be found here:

https://github.com/fabianp/yep

Bugs

Visualize the result with -v will only work on UNIX. An option –prof= would also be nice.

Misc

Author: Fabian Pedregosa <fabian.pedregosa@inria.fr>

License

Simplified BSD License, (C) 2011 Fabian Pedregosa.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yep-0.2.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file yep-0.2.tar.gz.

File metadata

  • Download URL: yep-0.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for yep-0.2.tar.gz
Algorithm Hash digest
SHA256 46b89a1967a537242edde93b18b37d082bddb238c5865a18adaa41a913ae2a86
MD5 8924763404d73b30d18f38b44fbd56dd
BLAKE2b-256 4ad51d697a4b19e74d18801f5a3e9286b3b3947ddd9bbf7ad30bdd229f114e9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page