Giter VIP home page Giter VIP logo

akarsu's Introduction

Actions Status GitHub issues GitHub stars GitHub license Downloads

akarsu is the New Generation Profiler based on PEP 669. The name of the project, comes from the surname of a minstrel named Muhlis Akarsu, which means stream.

Installation

akarsu can be installed by running pip install akarsu. It requires Python 3.12.0+ to run.

Usage

cat example.py

Output:

def foo():
    x = 1
    isinstance(x, int)
    return x


def bar():
    foo()


bar()

akarsu -f example.py

Output:

     Count     Event Type     Filename(function)
         1      PY_CALL       example.py(bar)
         1      PY_START      example.py(bar)
         1      PY_CALL       example.py(foo)
         1      PY_START      example.py(foo)
         1       C_CALL       example.py(<built-in function isinstance>)
         1      C_RETURN      example.py(foo)
         1     PY_RETURN      example.py(foo)
         1     PY_RETURN      example.py(bar)

Total number of events: 8
  PY_CALL = 2
  PY_START = 2
  PY_RETURN = 2
  C_CALL = 1
  C_RETURN = 1

If you want to show only the function calls in the output, you can use the -c or --calls argument.

akarsu -c -f example.py

Output:

     Count     Event Type     Filename(function)
         1      PY_CALL       example.py(bar)
         1      PY_CALL       example.py(foo)
         1       C_CALL       example.py(<built-in function isinstance>)

Total number of events: 3
  PY_CALL = 2
  C_CALL = 1

akarsu's People

Contributors

furkanonder avatar egeakman avatar anilbey 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.