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.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

line_profiler_pycharm-1.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file line-profiler-pycharm-1.1.0.tar.gz.

File metadata

  • Download URL: line-profiler-pycharm-1.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.8

File hashes

Hashes for line-profiler-pycharm-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e419de1db1b0ed49213d0b9ee33f99f24f6a2d431c7a76d39361f2c2a031af30
MD5 4d2401ab0a4677991979d5cbf94f208c
BLAKE2b-256 1eb6372fa332f8434077007bbf81ae1ba0ff15ecf5094e36c7c67ed8aa858845

See more details on using hashes here.

File details

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

File metadata

  • Download URL: line_profiler_pycharm-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.8

File hashes

Hashes for line_profiler_pycharm-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b9d80571d44685a7c5a01e3985965cd76fe523c22db6250cefb4a75ebd73fc7
MD5 5e0f2e9fd1f8c1fbe0e18d5acfe05262
BLAKE2b-256 30eb78e94e94b146048b24d632c3fb534bc7f4cdfa706588a34402d2862961af

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