Skip to main content

PyCharm Line Profiler helper package with which one can visualize profiles from the 'line-profiler' into PyCharm

Project description

Line Profiler Pycharm

Code to create .pclprof files which can be read by the PyCharm Line Profiler plugin.

Project heavily relies on the python line-profiler plugin.

This package can be used by the PyCharm Line Profiler plugin to profile code and visualize the resulting profiles.

The package exposes a decorator profile that can be used to create .pclprof files. These files are nothing more than json exports of the line-profiler .lprof files. These files can be read by the Pycharm Line Profiler plugin.

Example

The .pclprof files can be generated by decorating any function with the profile decorator

For example:

# profile_this.py
from line_profiler_pycharm import profile 

import time

@profile
def profile_this():    
    time.sleep(1)
    time.sleep(2)

if __name__ == "__main__":
    profile_this()

If you run this code:

python profile_this.py

A file profile_this.py.pclprof will be generated in your current working directory.

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

line_profiler_pycharm-1.2.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

line_profiler_pycharm-1.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file line_profiler_pycharm-1.2.0.tar.gz.

File metadata

  • Download URL: line_profiler_pycharm-1.2.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for line_profiler_pycharm-1.2.0.tar.gz
Algorithm Hash digest
SHA256 16cacf234952420fc324f17704c0cc2145d5afd2ec0593e359796927bcc0debb
MD5 18eb14e4e84524a7dc901e4244b9ff62
BLAKE2b-256 d0b0d7437c668ce49d45b8e28548d863ffccf4c067c66f147444594c1e531a92

See more details on using hashes here.

File details

Details for the file line_profiler_pycharm-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for line_profiler_pycharm-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d4c47c6894ab81f48fbb132ac4830490813b13c297016ae0d97bc7ef12041ad
MD5 c88dd3c7ab42a0227cd1a2fd5f87422f
BLAKE2b-256 cd5eb0331bf5e3f9f193b776fc0b22348143fc36f59bb931f0679a473ee667eb

See more details on using hashes here.

Supported by

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