Giter Site home page Giter Site logo

pprofile's Introduction

Python line profiler for Atom

example

Requirements

  • Mac OS, or Linux machine (untested on windows)

  • A line_profiler fork is needed to run this extension.

pip install https://github.com/iddl/line_profiler/zipball/master

How to run

  1. Make sure you're using the right environment. This is done by modifying the 'Shell command' option in the settings.

run_command

The default, /usr/bin/python, works for small tests. However it might be the case you're using virtualenvs and/or running code from a virtual machine.

Example setting of running profiler from a virtual environment in a VM:

ssh, [email protected], -t, /home/user/project/venv/bin/python

  1. ALT+SHIFT+P to activate

This will show an editor with a Run button.

  1. Import the function to profile first. The profiler is executed from the parent directory of the profiled code (this doesn't matter if you choose a custom shell command).

Use the profile function to run a profile on your code.

The end product should look something like

pre_run

  1. Stats will appear in the editor gutter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.