Code Monkey home page Code Monkey logo

pyflame-server's Introduction

pyflame-server

A webservice to facilate the use of pyflame

Pyflame解析和扩展

Installation

pip install -r requirements.txt
python wsgi.py

visit http://localhost:5000/

change localhost to your host ip

Usage

1 get pyflame for py2.6 py2.7 py3.4 py3.5 py3.6 py3.7

curl -o pyflame http://<your-host-ip>:5000/pyflame ; chmod +x pyflame

2.1 start python to profile

./pyflame -t python test.py > profile.txt

2.2 or attach python pid to profile, -s seconds -p pid, reference

sudo ./pyflame -s 5 -p 28947 > profile.txt

2.3 if you need to profile c stack at the same time (when you are curious about idle), add -c option

sudo ./pyflame -c -s 5 -p 28947 > profile.txt

3 upload to pyflame-server

curl -F "[email protected]" http://<your-host-ip>:5000/upload

4 visit the url printed by curl, samples here

My fork of Pyflame

Since the author of uber/pyflame no longer works at uber, the official repo is not well maintained. I forked to Meteorix/pyflame and did the following things:

  1. Merge PR of py3.7 support
  2. Merge PR of anaconda fix
  3. Fix py2.7 build script
  4. Add Dockerfile to build pyflame which enables py2.6/py2.7/py3.4/py3.5/py3.6/py3.7 support
  5. Add c/c++ stack profile

pyflame-server's People

Contributors

meteorix avatar

Watchers

James Cloos avatar

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.