Skip to content

Add pyinstrument 📈📉#1346

Closed
RDCH106 wants to merge 1 commit intovinta:masterfrom
RDCH106:patch-2
Closed

Add pyinstrument 📈📉#1346
RDCH106 wants to merge 1 commit intovinta:masterfrom
RDCH106:patch-2

Conversation

@RDCH106
Copy link

@RDCH106 RDCH106 commented Sep 6, 2019

What is this Python project?

Pyinstrument is a Python profiler. A profiler is a tool to help you 'optimize' your code - make it faster. It sounds obvious, but to get the biggest speed increase you should focus on the slowest part of your program. Pyinstrument helps you find it!

What's the difference between this Python project and similar ones?

Profiler with very good performance and low overhead, several output formats (text, json, html) and ability to profile a specific chunk of code.

imagen

Pyinstrument is a statistical profiler - it doesn't track every function call that your program makes. Instead, it's recording the call stack every 1ms.

That gives some advantages over other profilers. Firstly, statistical profilers are much lower-overhead than tracing profilers.

Django template render × 4000 Overhead
Base ████████████████ 0.33s
pyinstrument ████████████████████ 0.43s 30%
cProfile █████████████████████████████ 0.61s 84%
profile ██████████████████████████████████...██ 6.79s 2057%

But low overhead is also important because it can distort the results. When using a tracing profiler, code that makes a lot of Python function calls invokes the profiler a lot, making it slower. This distorts the results, and might lead you to optimise the wrong part of your program!

--

Anyone who agrees with this pull request could vote for it by adding a 👍 to it, and usually, the maintainer will merge it when votes reach 20.

@stale
Copy link

stale bot commented Nov 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 5, 2019
@RDCH106
Copy link
Author

RDCH106 commented Nov 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

What is the period of inactivity to close the PR?

@stale stale bot removed the stale label Nov 5, 2019
@stale stale bot added the stale label Dec 5, 2019
@stale stale bot closed this Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant