8 Python code profiling libraries and tools — every link checked and refreshed for 2026.

1

timeit

Part of the Python standard library – measures execution time of small code snippets.

2

cProfile

Python's built-in whole-program deterministic profiler, part of the standard library's Debugging and Profiling tools.

3

FunctionTrace

A graphical Python profiler that provides a clear view of your application's execution while being low-overhead and easy to use.

4

Palanteer

A set of lean and efficient visual profiling and logging tools to improve the quality of software, for C++ and Python programs.

5

Pyinstrument

A Python call-stack profiler that shows you why your code is slow, helping you optimize and make it faster.

6

py-spy

A low-overhead sampling profiler for Python programs, safe to use against production code without restarting or modifying it.

7

SnakeViz

A browser-based graphical viewer for the output of Python's cProfile module, an alternative to the standard library pstats module.

8

Yappi

Yet Another Python Profiler – this time multithreading, asyncio, and gevent aware.