Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
.. image:: https://img.shields.io/github/license/Nodd/lineprofilergui :target: https://github.com/Nodd/lineprofilergui/blob/master/LICENSE.txt .. image:: https://img.shields.io/pypi/v/line-profiler-gui.svg :target: https://pypi.python.org/pypi/line-profiler-gui/ .. image:: https://github.com/Nodd/lineprofilergui/actions/workflows/python-package.yml/badge.svg :target: https://github.com/Nodd/lineprofilergui/actions/workflows/python-package.yml .. image:: https://codecov.io/gh/Nodd/lineprofilergui/branch/master/graph/badge.svg?token=9O1RMPUNEU :target: https://codecov.io/gh/Nodd/lineprofilergui
This is a Qt GUI for the line_profiler_ python utility.
It allows to run and display the profiling results using an interactive interface.
It is functionnaly equivalent to the kernprof
script, which is used to invoque line_profiler
from the command line.
.. image:: https://raw.githubusercontent.com/Nodd/lineprofilergui/master/images/screenshot_main.png :alt: Screenshot of Line Profier GUI main window :align: center
.. contents::
kernprof
,kernprof
but with buttons,kernprof
,.. image:: https://raw.githubusercontent.com/Nodd/lineprofilergui/master/images/screenshot_config.png :alt: Screenshot of Line Profier GUI profiling configuration window :align: center
.. image:: https://raw.githubusercontent.com/Nodd/lineprofilergui/master/images/screenshot_settings.png :alt: Screenshot of Line Profier GUI application settings window :align: center
Line Profiler GUI can be installed from pypi using pip::
$ pip install line-profiler-gui
Line Profiler GUI can use anyon of the Qt python bindings by using QtPy_: PyQt5, PyQt6, PySide2 or PySide6. You can install the Qt python bindings of your choice in one go by specifying it between square brackets::
$ pip install line-profiler-gui[PySide2] $ pip install line-profiler-gui[PyQt5]
Source releases can be downloaded from PyPI_. To check out the development sources, you can use Git_::
$ git clone https://github.com/Nodd/lineprofilergui.git
Users should be familiar with the line_profiler line_profiler documentation <https://github.com/pyutils/line_profiler#id2>
_, but here is a quick reminder.
Since the line by line profiling slown down the execution, not all functions are profiled.
The functions to be profiled have to be marked with a @profile
decorator (see the example/
directory for more examples):
.. code-block:: python
@profile
def my_slow_function():
...
No import is needed, profile
is added to the python builtins for the execution.
Don't forget to remove the added decorators afterwards!
Once the profilng is done, the following data will be disaplyed for each line of the decorated functions:
In the displayed table, the lines are higlighted depending on their % Time
.
This allows to easily spot the lines to be optimised, and to not be distracted by the rest od the code.
.. code:: console
$ lineprofilergui -h
usage: lineprofilergui [-h] [-V] [-l LPROF] [-r] [-o OUTFILE] [-s SETUP]
[script] ...
Run, profile a python script and display results.
positional arguments:
script The python script file to run
args Optional script arguments
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-l LPROF, --lprof LPROF
Display data from a .lprof file
-r, --run Profile the python script on launch
-o OUTFILE, --outfile OUTFILE
Save stats to OUTFILE (default: 'scriptname.lprof')
-s SETUP, --setup SETUP
Python script to execute before the code to profile
Spyder plugin <https://github.com/spyder-ide/spyder-line-profiler>
_PyCharm plugin <https://plugins.jetbrains.com/plugin/16536-line-profiler>
_.. _pypi: http://pypi.python.org/pypi/line-profiler-gui .. _line_profiler: https://pypi.org/project/line_profiler/ .. _QtPy: https://pypi.org/project/QtPy/ .. _git: http://git-scm.com/
FAQs
A Qt GUI to run and display line by line profiling data using line_profiler
We found that line-profiler-gui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.