Skip to main content

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

Metadata

Release files for akarsu 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for akarsu 0.2.0
File Size Uploaded
akarsu-0.2.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for akarsu 0.2.0
File Interpreter ABI Platform
akarsu-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / akarsu-0.2.0.tar.gz

Download URL akarsu-0.2.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
762864b1b452d60d0235199a515a33cbc3ae0e78d92b709e004cdff18b0c43af
BLAKE2b-256 checksum
How to use checksums
177f3577b49dc54ffcb554b16c6b59651adad499ecffeb580fc994be8cf84da4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / akarsu-0.2.0-py3-none-any.whl

Download URL akarsu-0.2.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9307e1609e9e49d1bf965126ee09b7f8296ece02785465ad33add58ab434b31
BLAKE2b-256 checksum
How to use checksums
3183f2489e724dd764f1634b7c7163914987c2f242cfa8b0ffcba2a553f455a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page