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.
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/vinta/awesome-python/pull/1346
**Author:** [@RDCH106](https://github.com/RDCH106)
**Created:** 9/6/2019
**Status:** ❌ Closed
**Base:** `master` ← **Head:** `patch-2`
---
### 📝 Commits (1)
- [`d4924b0`](https://github.com/vinta/awesome-python/commit/d4924b0e0fa7131456bdbb30bba8a0dbc2b4333e) Add pyinstrument 📈📉
### 📊 Changes
**1 file changed** (+1 additions, -0 deletions)
<details>
<summary>View changed files</summary>
📝 `README.md` (+1 -0)
</details>
### 📄 Description
## 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](https://en.wikipedia.org/wiki/Amdahl%27s_law). 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.

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 :+1: to it, and usually, the maintainer will merge it when votes reach **20**.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/vinta/awesome-python/pull/1346
Author: @RDCH106
Created: 9/6/2019
Status: ❌ Closed
Base:
master← Head:patch-2📝 Commits (1)
d4924b0Add pyinstrument 📈📉📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
README.md(+1 -0)📄 Description
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.
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.
████████████████0.33s████████████████████0.43s█████████████████████████████0.61s██████████████████████████████████...██6.79sBut 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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.