René's URL Explorer Experiment


Title: Python's Sampling Profiler: Low-Overhead Profiling With profiling.sampling – Real Python

Open Graph Title: Python's Sampling Profiler: Low-Overhead Profiling With profiling.sampling – Real Python

Description: Explore Python 3.15's new sampling profiler and learn low-overhead profiling of scripts, threads, and live production processes.

Open Graph Description: Explore Python 3.15's new sampling profiler and learn low-overhead profiling of scripts, threads, and live production processes.

Mail addresses
?subject=Python article for you&body=Python's Sampling Profiler: Low-Overhead Profiling With profiling.sampling on Real Python https://realpython.com/python315-sampling-profiler/

Opengraph URL: https://realpython.com/python315-sampling-profiler/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Python's Sampling Profiler: Low-Overhead Profiling With profiling.sampling",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/Python-3.15-Preview-New-Profiling-Module_Watermarked.27cdafb337e4.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python315-sampling-profiler/",
    "lastReviewed": "2026-10-12",
    "author": {
      "@type": "Person",
      "name": "Bartosz Zaczy\u0144ski",
      "image": "https://realpython.com/cdn-cgi/image/width=1694,height=1694,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/coders_lab_2109368.259b1599fbee.jpg",
      "url": "https://realpython.com/team/bzaczynski/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Aldren Santos",
        "image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
        "url": "https://realpython.com/team/asantos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Brenda Weleschuk",
        "image": "https://realpython.com/cdn-cgi/image/width=320,height=320,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/IMG_3324_1.50b309355fc1.jpg",
        "url": "https://realpython.com/team/bweleschuk/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Leodanis Pozo Ramos",
        "image": "https://realpython.com/cdn-cgi/image/width=862,height=862,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Perfil_final1.9f896bc212f6.jpg",
        "url": "https://realpython.com/team/lpozoramos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2026-08-26T14:00:00+00:00",
  "dateModified": "2026-10-12T08:15:34.434285+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Bartosz Zaczy\u0144ski",
    "image": "https://realpython.com/cdn-cgi/image/width=1694,height=1694,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/coders_lab_2109368.259b1599fbee.jpg",
    "url": "https://realpython.com/team/bzaczynski/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "Explore Python 3.15's new sampling profiler and learn low-overhead profiling of scripts, threads, and live production processes.",
  "hasPart": {
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "What is the new sampling profiler in Python 3.15?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eIt\u0026rsquo;s a statistical profiler in the standard library\u0026rsquo;s new \u003ccode\u003eprofiling.sampling\u003c/code\u003e module, code-named Tachyon. It periodically snapshots a process\u0026rsquo;s call stack from the outside\u0026mdash;a thousand times per second by default\u0026mdash;so the target keeps running at its normal speed.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "Is cProfile deprecated in Python 3.15?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eNo. Only the pure-Python \u003ccode\u003eprofile\u003c/code\u003e module is deprecated, with removal planned for Python 3.17. The \u003ca href=\"/ref/stdlib/cprofile/\" class=\"ref-link\"\u003e\u003ccode\u003ecProfile\u003c/code\u003e\u003c/a\u003e module remains available as a backward-compatible alias for the relocated \u003ccode\u003eprofiling.tracing\u003c/code\u003e module.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "Can I profile a running production process without restarting it?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eYes. The \u003ccode\u003eattach\u003c/code\u003e subcommand samples any live Python 3.15 process by its process ID without restarting or instrumenting it. You need debugger-level privileges, such as \u003ccode\u003esudo\u003c/code\u003e on Linux or macOS, and the profiler must run the same Python version as the target.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "How is profiling.sampling different from py-spy?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eBoth sample a target process from the outside, and \u003ca href=\"/ref/tools/py-spy/\" class=\"ref-link\"\u003epy\u0026#45;spy\u003c/a\u003e pioneered this approach for Python. The standard-library profiler requires no installation, understands 3.15\u0026rsquo;s interpreter internals, including async task stacks and specialized \u003ca href=\"/ref/glossary/bytecode/\" class=\"ref-link\"\u003ebytecode\u003c/a\u003e instructions, and adds a live TUI plus flame-graph, heatmap, and Firefox Profiler outputs. However, py-spy supports attaching to a wider range of Python versions.\u003c/p\u003e"
        }
      },
      {
        "@type": "Question",
        "name": "Does the sampling profiler work with threads and async code?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "\u003cp\u003eYes. Pass \u003ccode\u003e-a\u003c/code\u003e to sample all threads instead of just the main one, and \u003ccode\u003e--async-aware\u003c/code\u003e to reconstruct \u003ca href=\"/ref/stdlib/asyncio/\" class=\"ref-link\"\u003easyncio\u003c/a\u003e task stacks, optionally with \u003ccode\u003e--async-mode all\u003c/code\u003e to include tasks suspended at \u003ccode\u003eawait\u003c/code\u003e expressions. Named tasks appear under their names in the report.\u003c/p\u003e"
        }
      }
    ]
  }
}

authorReal Python
theme-color#18354c
color-schemelight dark
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Python-3.15-Preview-New-Profiling-Module_Watermarked.27cdafb337e4.jpg
og:imagehttps://files.realpython.com/media/Python-3.15-Preview-New-Profiling-Module_Watermarked.27cdafb337e4.jpg
twitter:creator@realpython
og:typearticle
og:site_nameReal Python
apple-mobile-web-app-titleReal Python

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python315-sampling-profiler/
Your Learning Plan →Your personalized Python learning planhttps://realpython.com/account/learning-plan/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest&_from=nav_library
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/search?kind=exercise&kind=quiz&_from=nav_library
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Mentor AI →NewYour personal Python mentorhttps://realpython.com/mentor/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Live Courses →Live, instructor-led Python courseshttps://realpython.com/live/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Unlock All Content and Become a Python Expert →Get unlimited access to all Real Python has to offerhttps://realpython.com/account/join/?from=navbar_learn
Unlock All Content →Become a Python Experthttps://realpython.com/account/join/?from=navbar_learn
More https://realpython.com/python315-sampling-profiler/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Contributorhttps://realpython.com/jobs/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?intent=navbar&next=%2Fpython315-sampling-profiler%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics&_from=sidebar_level
Intermediatehttps://realpython.com/search?level=intermediate&_from=sidebar_level
Advancedhttps://realpython.com/search?level=advanced&_from=sidebar_level
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python315-sampling-profiler/#toc
Get to Know Python’s New profiling Packagehttps://realpython.com/python315-sampling-profiler/#get-to-know-pythons-new-profiling-package
Compare Tracing and Sampling Profilershttps://realpython.com/python315-sampling-profiler/#compare-tracing-and-sampling-profilers
How Tracing Profilers Workhttps://realpython.com/python315-sampling-profiler/#how-tracing-profilers-work
How Sampling Profilers Workhttps://realpython.com/python315-sampling-profiler/#how-sampling-profilers-work
When to Use Whichhttps://realpython.com/python315-sampling-profiler/#when-to-use-which
Take Python 3.15’s Sampling Profiler for a Spinhttps://realpython.com/python315-sampling-profiler/#take-python-315s-sampling-profiler-for-a-spin
Set Up Python 3.15 With uvhttps://realpython.com/python315-sampling-profiler/#set-up-python-315-with-uv
Profile a Whole Program Runhttps://realpython.com/python315-sampling-profiler/#profile-a-whole-program-run
Split Wall-Clock Time From CPU Timehttps://realpython.com/python315-sampling-profiler/#split-wall-clock-time-from-cpu-time
Profile Threads, Async Tasks, and Native Codehttps://realpython.com/python315-sampling-profiler/#profile-threads-async-tasks-and-native-code
Watch Your Threads Fight for the GILhttps://realpython.com/python315-sampling-profiler/#watch-your-threads-fight-for-the-gil
Profile Async Code Task by Taskhttps://realpython.com/python315-sampling-profiler/#profile-async-code-task-by-task
See Where Python Hands Off to Native Codehttps://realpython.com/python315-sampling-profiler/#see-where-python-hands-off-to-native-code
Turn Samples Into Pictureshttps://realpython.com/python315-sampling-profiler/#turn-samples-into-pictures
Explore an Interactive Flame Graphhttps://realpython.com/python315-sampling-profiler/#explore-an-interactive-flame-graph
Read a Line-Level Heatmaphttps://realpython.com/python315-sampling-profiler/#read-a-line-level-heatmap
Export to Firefox Profiler and Other Toolshttps://realpython.com/python315-sampling-profiler/#export-to-firefox-profiler-and-other-tools
Record Binary Profiles and Replay Them Laterhttps://realpython.com/python315-sampling-profiler/#record-binary-profiles-and-replay-them-later
Capture Once, Convert Anytimehttps://realpython.com/python315-sampling-profiler/#capture-once-convert-anytime
Prove Your Fix With a Differential Flame Graphhttps://realpython.com/python315-sampling-profiler/#prove-your-fix-with-a-differential-flame-graph
Read the Red When a Fix Removes Workhttps://realpython.com/python315-sampling-profiler/#read-the-red-when-a-fix-removes-work
Inspect a Live Python Processhttps://realpython.com/python315-sampling-profiler/#inspect-a-live-python-process
Attach to a Running Processhttps://realpython.com/python315-sampling-profiler/#attach-to-a-running-process
Watch Live Statistics in Your Terminalhttps://realpython.com/python315-sampling-profiler/#watch-live-statistics-in-your-terminal
Zoom in on Single Bytecode Instructionshttps://realpython.com/python315-sampling-profiler/#zoom-in-on-single-bytecode-instructions
Choose the Right Profiler for the Jobhttps://realpython.com/python315-sampling-profiler/#choose-the-right-profiler-for-the-job
Conclusionhttps://realpython.com/python315-sampling-profiler/#conclusion
Frequently Asked Questionshttps://realpython.com/python315-sampling-profiler/#frequently-asked-questions
https://realpython.com/feedback/survey/article/python315-sampling-profiler/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python315-sampling-profiler/disliked/?from=article-sidebar
Bartosz Zaczyńskihttps://realpython.com/python315-sampling-profiler/#author
https://realpython.com/python315-sampling-profiler/#reader-comments
advancedhttps://realpython.com/tutorials/advanced/
pythonhttps://realpython.com/tutorials/python/
Get to Know Python’s New profiling Packagehttps://realpython.com/python315-sampling-profiler/#get-to-know-pythons-new-profiling-package
Compare Tracing and Sampling Profilershttps://realpython.com/python315-sampling-profiler/#compare-tracing-and-sampling-profilers
How Tracing Profilers Workhttps://realpython.com/python315-sampling-profiler/#how-tracing-profilers-work
How Sampling Profilers Workhttps://realpython.com/python315-sampling-profiler/#how-sampling-profilers-work
When to Use Whichhttps://realpython.com/python315-sampling-profiler/#when-to-use-which
Take Python 3.15’s Sampling Profiler for a Spinhttps://realpython.com/python315-sampling-profiler/#take-python-315s-sampling-profiler-for-a-spin
Set Up Python 3.15 With uvhttps://realpython.com/python315-sampling-profiler/#set-up-python-315-with-uv
Profile a Whole Program Runhttps://realpython.com/python315-sampling-profiler/#profile-a-whole-program-run
Split Wall-Clock Time From CPU Timehttps://realpython.com/python315-sampling-profiler/#split-wall-clock-time-from-cpu-time
Profile Threads, Async Tasks, and Native Codehttps://realpython.com/python315-sampling-profiler/#profile-threads-async-tasks-and-native-code
Watch Your Threads Fight for the GILhttps://realpython.com/python315-sampling-profiler/#watch-your-threads-fight-for-the-gil
Profile Async Code Task by Taskhttps://realpython.com/python315-sampling-profiler/#profile-async-code-task-by-task
See Where Python Hands Off to Native Codehttps://realpython.com/python315-sampling-profiler/#see-where-python-hands-off-to-native-code
Turn Samples Into Pictureshttps://realpython.com/python315-sampling-profiler/#turn-samples-into-pictures
Explore an Interactive Flame Graphhttps://realpython.com/python315-sampling-profiler/#explore-an-interactive-flame-graph
Read a Line-Level Heatmaphttps://realpython.com/python315-sampling-profiler/#read-a-line-level-heatmap
Export to Firefox Profiler and Other Toolshttps://realpython.com/python315-sampling-profiler/#export-to-firefox-profiler-and-other-tools
Record Binary Profiles and Replay Them Laterhttps://realpython.com/python315-sampling-profiler/#record-binary-profiles-and-replay-them-later
Capture Once, Convert Anytimehttps://realpython.com/python315-sampling-profiler/#capture-once-convert-anytime
Prove Your Fix With a Differential Flame Graphhttps://realpython.com/python315-sampling-profiler/#prove-your-fix-with-a-differential-flame-graph
Read the Red When a Fix Removes Workhttps://realpython.com/python315-sampling-profiler/#read-the-red-when-a-fix-removes-work
Inspect a Live Python Processhttps://realpython.com/python315-sampling-profiler/#inspect-a-live-python-process
Attach to a Running Processhttps://realpython.com/python315-sampling-profiler/#attach-to-a-running-process
Watch Live Statistics in Your Terminalhttps://realpython.com/python315-sampling-profiler/#watch-live-statistics-in-your-terminal
Zoom in on Single Bytecode Instructionshttps://realpython.com/python315-sampling-profiler/#zoom-in-on-single-bytecode-instructions
Choose the Right Profiler for the Jobhttps://realpython.com/python315-sampling-profiler/#choose-the-right-profiler-for-the-job
Conclusionhttps://realpython.com/python315-sampling-profiler/#conclusion
Frequently Asked Questionshttps://realpython.com/python315-sampling-profiler/#frequently-asked-questions
Remove adshttps://realpython.com/account/join/
Python 3.15https://realpython.com/python315-new-features/
uvhttps://realpython.com/ref/tools/uv/
threadshttps://realpython.com/ref/glossary/thread/
asynchttps://realpython.com/ref/glossary/asynchronous-programming/
terminalhttps://realpython.com/terminal-commands/
threadinghttps://realpython.com/intro-to-python-threading/
asynciohttps://realpython.com/async-io-python/
concurrencyhttps://realpython.com/ref/best-practices/concurrency/
profilinghttps://realpython.com/python-profiling/
Click here to download the free sample codehttps://realpython.com/bonus/python315-sampling-profiler-code/
https://realpython.com/quizzes/python315-sampling-profiler/
Python 3.15 Preview: Sampling Profilerhttps://realpython.com/quizzes/python315-sampling-profiler/
https://realpython.com/python315-sampling-profiler/#get-to-know-pythons-new-profiling-package
standard libraryhttps://realpython.com/ref/glossary/standard-library/
profilehttps://realpython.com/ref/stdlib/profile/
cProfilehttps://realpython.com/ref/stdlib/cprofile/
C programming languagehttps://realpython.com/c-for-python-programmers/
PEP 799https://peps.python.org/pep-0799/
packagehttps://realpython.com/ref/glossary/package/
submoduleshttps://realpython.com/ref/glossary/module/
cProfilehttps://realpython.com/python-profiling/#cprofile-collect-detailed-runtime-statistics
classhttps://realpython.com/ref/glossary/class/
Profiling in Pythonhttps://realpython.com/python-profiling/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sampling-profiler/#compare-tracing-and-sampling-profilers
https://realpython.com/python315-sampling-profiler/#how-tracing-profilers-work
interpreterhttps://realpython.com/ref/glossary/interpreter/
callbackhttps://realpython.com/ref/glossary/callback/
https://realpython.com/python315-sampling-profiler/#how-sampling-profilers-work
instrumenting your codehttps://en.wikipedia.org/wiki/Instrumentation_(computer_programming)
call stackhttps://realpython.com/ref/computer-science-glossary/call-stack/
APIshttps://realpython.com/ref/glossary/api/
bytecodehttps://realpython.com/ref/glossary/bytecode/
https://realpython.com/python315-sampling-profiler/#when-to-use-which
GUIhttps://realpython.com/ref/glossary/graphical-user-interface/
Austinhttps://pypi.org/project/austin-dist/
py-spyhttps://pypi.org/project/py-spy/
pyinstrumenthttps://pypi.org/project/pyinstrument/
Python 3.12 taught the Linux perf profilerhttps://realpython.com/python312-perf-profiler/
frameshttps://en.wikipedia.org/wiki/Call_stack#Structure
https://realpython.com/python315-sampling-profiler/#take-python-315s-sampling-profiler-for-a-spin
hottesthttps://en.wikipedia.org/wiki/Hot_spot_(computer_programming)
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sampling-profiler/#set-up-python-315-with-uv
uvhttps://realpython.com/python-uv/
pyproject.tomlhttps://realpython.com/python-pyproject-toml/
CPythonhttps://realpython.com/ref/glossary/cpython/
virtual environmenthttps://realpython.com/ref/glossary/virtual-environment/
NumPyhttps://realpython.com/numpy-array-programming/
trefoil knothttps://en.wikipedia.org/wiki/Trefoil_knot
Tkinterhttps://realpython.com/python-gui-tkinter/
Frame rateshttps://en.wikipedia.org/wiki/Frame_rate
https://realpython.com/python315-sampling-profiler/#profile-a-whole-program-run
command-line interfacehttps://realpython.com/ref/glossary/command-line-interface/
Python scripthttps://realpython.com/python-script-structure/
modulehttps://realpython.com/ref/glossary/module/
venvhttps://realpython.com/ref/stdlib/venv/
pstatshttps://realpython.com/ref/stdlib/pstats/
loghttps://realpython.com/ref/best-practices/logging/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sampling-profiler/#split-wall-clock-time-from-cpu-time
threadhttps://realpython.com/ref/glossary/thread/
os.fsync()https://docs.python.org/3/library/os.html#os.fsync
I/O-boundhttps://realpython.com/ref/glossary/io-bound-task/
Global Interpreter Lockhttps://realpython.com/python-gil/
exceptionhttps://realpython.com/ref/glossary/exception/
GILhttps://realpython.com/ref/glossary/gil/
https://realpython.com/python315-sampling-profiler/#profile-threads-async-tasks-and-native-code
https://realpython.com/python315-sampling-profiler/#watch-your-threads-fight-for-the-gil
time.sleep()https://realpython.com/python-sleep/
Python threadshttps://realpython.com/intro-to-python-threading/
lockhttps://realpython.com/python-thread-lock/
free-threaded buildhttps://realpython.com/python313-free-threading-jit/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sampling-profiler/#profile-async-code-task-by-task
concurrencyhttps://realpython.com/ref/glossary/concurrency/
asynciohttps://realpython.com/async-io-python/
event loophttps://en.wikipedia.org/wiki/Event_loop
constanthttps://realpython.com/python-constants/
EpollSelector.select()https://docs.python.org/3/library/selectors.html#selectors.EpollSelector
coroutineshttps://realpython.com/ref/glossary/coroutine/
awaithttps://realpython.com/ref/keywords/await/
group.create_task(…, name=…)https://realpython.com/python311-exception-groups/#asynchronous-task-groups-in-python-311
https://realpython.com/python315-sampling-profiler/#see-where-python-hands-off-to-native-code
very first profilehttps://realpython.com/python315-sampling-profiler/#profile-a-whole-program-run
NumPyhttps://realpython.com/numpy-tutorial/
C extensionhttps://realpython.com/build-python-c-extension-module/
sudohttps://en.wikipedia.org/wiki/Sudo
attaching to a running processhttps://realpython.com/python315-sampling-profiler/#attach-to-a-running-process
roothttps://en.wikipedia.org/wiki/Superuser
mainloop()https://docs.python.org/3/library/tkinter.html#tkinter.mainloop
Tk’shttps://en.wikipedia.org/wiki/Tk_(software)
flame graphshttps://realpython.com/python315-sampling-profiler/#explore-an-interactive-flame-graph
pstatshttps://realpython.com/ref/stdlib/pstats/
perf profilerhttps://realpython.com/python312-perf-profiler/
3.12https://realpython.com/python312-new-features/
garbage collectorhttps://realpython.com/ref/glossary/garbage-collection/
allocation patternshttps://realpython.com/python-memory-management/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sampling-profiler/#turn-samples-into-pictures
https://realpython.com/python315-sampling-profiler/#explore-an-interactive-flame-graph
flame graphhttps://www.brendangregg.com/flamegraphs.html
https://files.realpython.com/media/Screenshot_From_2026-07-19_15-02-19.e848af472f28.png
web applicationhttps://realpython.com/python-web-applications/
https://realpython.com/python315-sampling-profiler/#read-a-line-level-heatmap
https://files.realpython.com/media/Screenshot_From_2026-07-19_15-05-14.7359c8cfa539.png
https://realpython.com/python315-sampling-profiler/#export-to-firefox-profiler-and-other-tools
JSONhttps://realpython.com/python-json/
Firefox Profilerhttps://profiler.firefox.com/
flamegraph.plhttps://github.com/brendangregg/flamegraph
newline-delimited JSONhttps://realpython.com/ref/computer-science-glossary/ndjson/
https://realpython.com/python315-sampling-profiler/#record-binary-profiles-and-replay-them-later
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sampling-profiler/#capture-once-convert-anytime
Zstandard from the new compression.zstd modulehttps://realpython.com/python-news-june-2025/#pep-784-bringing-zstandard-to-the-standard-library
CPythonhttps://realpython.com/ref/glossary/cpython/
pyenvhttps://realpython.com/intro-to-pyenv/
https://realpython.com/python315-sampling-profiler/#prove-your-fix-with-a-differential-flame-graph
f-stringhttps://realpython.com/python-f-strings/
memoizationhttps://en.wikipedia.org/wiki/Memoization
https://files.realpython.com/media/Screenshot_From_2026-07-19_15-15-03.bc688e50f792.png
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sampling-profiler/#read-the-red-when-a-fix-removes-work
PPMhttps://en.wikipedia.org/wiki/Netpbm#PPM_example
https://files.realpython.com/media/Untitled.54357716d654.png
GIL modehttps://realpython.com/python315-sampling-profiler/#watch-your-threads-fight-for-the-gil
https://realpython.com/python315-sampling-profiler/#inspect-a-live-python-process
observabilityhttps://realpython.com/ref/software-engineering-glossary/observability/
bytecodehttps://realpython.com/ref/glossary/bytecode/
https://realpython.com/python315-sampling-profiler/#attach-to-a-running-process
PIDhttps://en.wikipedia.org/wiki/Process_identifier
semantic versionhttps://realpython.com/ref/software-engineering-glossary/semantic-versioning/
Yama security modulehttps://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html
childrenhttps://en.wikipedia.org/wiki/Child_process
profiling native codehttps://realpython.com/python315-sampling-profiler/#see-where-python-hands-off-to-native-code
Tkinterhttps://realpython.com/ref/stdlib/tkinter/
SSHhttps://en.wikipedia.org/wiki/Secure_Shell
dump subcommandhttps://realpython.com/python315-sampling-profiler/#see-where-python-hands-off-to-native-code
tracebackhttps://realpython.com/ref/stdlib/traceback/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sampling-profiler/#watch-live-statistics-in-your-terminal
top-likehttps://en.wikipedia.org/wiki/Top_(software)
htophttps://en.wikipedia.org/wiki/Htop
https://realpython.com/python315-sampling-profiler/#zoom-in-on-single-bytecode-instructions
CALL_BUILTIN_Ohttps://github.com/python/cpython/blob/b090d06e7331c40b3c94e70b35a09f785b279e17/Include/opcode_ids.h#L152
generic formhttps://docs.python.org/3/library/dis.html#opcode-CALL
adaptive specializing interpreter from Python 3.11https://realpython.com/python311-new-features/#faster-code-execution
how the JIT compiler in Python 3.15https://realpython.com/python315-jit-compiler/
https://realpython.com/python315-sampling-profiler/#choose-the-right-profiler-for-the-job
https://realpython.com/python315-sampling-profiler/#conclusion
GILhttps://realpython.com/ref/glossary/gil/
asynciohttps://realpython.com/ref/stdlib/asyncio/
TUIhttps://en.wikipedia.org/wiki/Text-based_user_interface
htophttps://en.wikipedia.org/wiki/Htop
official profiling documentationhttps://docs.python.org/3.15/library/profiling.sampling.html
Profiling in Pythonhttps://realpython.com/python-profiling/
Click here to download the free sample codehttps://realpython.com/bonus/python315-sampling-profiler-code/
Remove adshttps://realpython.com/account/join/
https://realpython.com/python315-sampling-profiler/#frequently-asked-questions
cProfilehttps://realpython.com/ref/stdlib/cprofile/
py-spyhttps://realpython.com/ref/tools/py-spy/
bytecodehttps://realpython.com/ref/glossary/bytecode/
asynciohttps://realpython.com/ref/stdlib/asyncio/
https://realpython.com/quizzes/python315-sampling-profiler/
Python 3.15 Preview: Sampling Profilerhttps://realpython.com/quizzes/python315-sampling-profiler/
https://realpython.com/feedback/survey/article/python315-sampling-profiler/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python315-sampling-profiler/disliked/?from=article-footer
https://realpython.com/team/bzaczynski/
» More about Bartoszhttps://realpython.com/team/bzaczynski/
https://realpython.com/team/asantos/
Aldrenhttps://realpython.com/team/asantos/
https://realpython.com/team/bweleschuk/
Brendahttps://realpython.com/team/bweleschuk/
https://realpython.com/team/lpozoramos/
Leodanishttps://realpython.com/team/lpozoramos/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python315-sampling-profiler
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python315-sampling-profiler
https://realpython.com/feedback/survey/article/python315-sampling-profiler/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python315-sampling-profiler/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython315-sampling-profiler%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Python%26%23x27%3Bs%20Sampling%20Profiler%3A%20Low-Overhead%20Profiling%20With%20profiling.sampling&url=https%3A%2F%2Frealpython.com%2Fpython315-sampling-profiler%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Python%26%23x27%3Bs%20Sampling%20Profiler%3A%20Low-Overhead%20Profiling%20With%20profiling.sampling%20https%3A%2F%2Frealpython.com%2Fpython315-sampling-profiler%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython315-sampling-profiler%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
advancedhttps://realpython.com/tutorials/advanced/
pythonhttps://realpython.com/tutorials/python/
Async Programming in Python: From Generators to asynciohttps://realpython.com/python-async-features/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sampling-profiler
Python's UTF-8 Default: Keep Your File I/O Portablehttps://realpython.com/python315-utf8-default/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sampling-profiler
Python Lazy Imports: Speed Up Startup With the lazy Keywordhttps://realpython.com/python315-lazy-imports/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sampling-profiler
Async Generators Get yield from and Other Python News for September 2026https://realpython.com/python-news-september-2026/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sampling-profiler
How to Write an AGENTS.md File for a Python Projecthttps://realpython.com/agents-md/?utm_source=realpython&utm_medium=web&utm_campaign=related-post&utm_content=python315-sampling-profiler
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython315-sampling-profiler%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython315-sampling-profiler%2F
Sign-Inhttps://realpython.com/account/login/?intent=continue_reading&next=/python315-sampling-profiler/
Start Herehttps://realpython.com/start-here/
Your Learning Planhttps://realpython.com/account/learning-plan/
Browse Topicshttps://realpython.com/tutorials/all/
Learning Resourceshttps://realpython.com/search
Python Referencehttps://realpython.com/ref/
Cheat Sheetshttps://realpython.com/cheatsheets/
Support Centerhttps://support.realpython.com
Mentor AIhttps://realpython.com/mentor/
Learning Pathshttps://realpython.com/learning-paths/
Tutorialshttps://realpython.com/tutorials/
Courseshttps://realpython.com/courses/
Quizzeshttps://realpython.com/quizzes/
Coding Exerciseshttps://realpython.com/coding-exercises/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Data Sciencehttps://realpython.com/start/data-science-analytics/
AI Apps & Agentshttps://realpython.com/start/ai-apps-agents/
Machine Learninghttps://realpython.com/start/machine-learning/
Automationhttps://realpython.com/start/scripting-automation/
Web Developmenthttps://realpython.com/start/web-development-apis/
Cybersecurityhttps://realpython.com/start/cybersecurity/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.