<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/lhhbaduyz" -->

---
title: Python: introducing tprof, a targeting profiler | daily.dev
description: tprof is a new targeting profiler for Python 3.12+ that measures performance of specific functions rather than entire programs. Unlike traditional profilers...
canonical: https://daily.dev/posts/lhhbaduyz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Python: introducing tprof, a targeting profiler | daily.dev
og:description: tprof is a new targeting profiler for Python 3.12+ that measures performance of specific functions rather than entire programs. Unlike traditional profilers...
og:url: https://daily.dev/posts/lhhbaduyz
og:image: https://api.daily.dev/og/posts/LhhBaduyz.png
og:image:alt: Post cover image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Python: introducing tprof, a targeting profiler

**[Learn Python](https://daily.dev/sources/lpython)** · [@sophyia](https://daily.dev/sophyia) · 9 upvotes · 1 comments

## Summary

tprof is a new targeting profiler for Python 3.12+ that measures performance of specific functions rather than entire programs. Unlike traditional profilers that add overhead across the whole codebase, tprof uses sys.monitoring to track only designated target functions, providing quick command-line reports with timing statistics. It supports comparison mode to benchmark "before" and "after" versions of optimized code, showing percentage improvements. The tool offers both CLI and Python API interfaces, with timing done in C to minimize overhead.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://adamj.eu/tech/2026/01/14/python-introducing-tprof/>

## Community discussion

Top comments from developers on daily.dev.

**@desmondoyeyiola** · 0 upvotes

> Wow this is really great
> But would it be possible to show specific and precise improvement rather than percentage?

## Similar posts on daily.dev

- [Python: tprof 1.3.0: now with less overhead](https://daily.dev/posts/python-tprof-1-3-0-now-with-less-overhead-z5sx5alai) · Adam Johnson · 0 upvotes · 0 comments
- [profiling.sampling — Statistical profiler ¶](https://daily.dev/posts/profiling-sampling-statistical-profiler--bd9rldcma) · Hacker News · 1 upvotes · 0 comments
- [Python: introducing profiling-explorer](https://daily.dev/posts/python-introducing-profiling-explorer-eb3yvhchy) · Adam Johnson · 1 upvotes · 0 comments
- [Python 3.15 Has a Production Profiler. Python 3.15 Is Not Production-Ready.](https://daily.dev/posts/python-3-15-has-a-production-profiler-python-3-15-is-not-production-ready--wgbuvk9t9) · Medium · 1 upvotes · 0 comments
- [Python Timer Functions – Real Python](https://daily.dev/posts/python-timer-functions-real-python-fyyleajh7) · Real Python · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#performance](https://daily.dev/tags/performance)

[View this post on daily.dev](https://daily.dev/posts/lhhbaduyz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/lhhbaduyz","headline":"Python: introducing tprof, a targeting profiler","text":"Shared: Python: introducing tprof, a targeting profiler","url":"https://daily.dev/posts/lhhbaduyz","datePublished":"2026-01-23T06:31:01.590Z","dateModified":"2026-01-23T06:31:01.593Z","author":{"@type":"Person","name":"Sophia Iroegbu","url":"https://daily.dev/sophyia","image":"https://media.daily.dev/image/upload/s--1j1RQwqv--/f_auto/v1705049914/avatars/avatar_knFW0EX5eXvqpm72yZRfE","description":"I enjoy building open-source projects! ","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":2550}},"image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":9},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/CKmQw3IBI"},"comment":[{"@type":"Comment","text":"Wow this is really great\nBut would it be possible to show specific and precise improvement rather than percentage?","datePublished":"2026-09-06T01:00:09.455Z","url":"https://daily.dev/posts/LhhBaduyz#c-xmp8rbONl","author":{"@type":"Person","name":"Desmond Oyeyiola","url":"https://daily.dev/desmondoyeyiola","image":"https://lh3.googleusercontent.com/a/ACg8ocI7yB4SCaU06J-LvcMpv-xPE0vE3EdJv484X8TjyJFT33WQzHk=s96-c"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/lpython","name":"Learn Python"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Learn Python","item":"https://daily.dev/squads/lpython"},{"@type":"ListItem","position":3,"name":"Python: introducing tprof, a targeting profiler"}]}
```

