parthtamu/rag-code-assistant
0
1<!DOCTYPE html>2 3<html lang="en" data-content_root="../">4 <head>5 <meta charset="utf-8" />6 <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />7<meta property="og:title" content="pstats — Statistics for profilers" />8<meta property="og:type" content="website" />9<meta property="og:url" content="https://docs.python.org/3/library/pstats.html" />10<meta property="og:site_name" content="Python documentation" />11<meta property="og:description" content="Source code: Lib/pstats.py The pstats module provides tools for reading, manipulating, and displaying profiling statistics generated by Python’s profilers. It reads output from both profiling.traci..." />12<meta property="og:image:width" content="1146" />13<meta property="og:image:height" content="600" />14<meta property="og:image" content="https://docs.python.org/3.15/_images/social_previews/summary_library_pstats_c76c2314.png" />15<meta property="og:image:alt" content="Source code: Lib/pstats.py The pstats module provides tools for reading, manipulating, and displaying profiling statistics generated by Python’s profilers. It reads output from both profiling.traci..." />16<meta name="description" content="Source code: Lib/pstats.py The pstats module provides tools for reading, manipulating, and displaying profiling statistics generated by Python’s profilers. It reads output from both profiling.traci..." />17<meta name="twitter:card" content="summary_large_image" />18<meta name="theme-color" content="#3776ab">19 20 <title>pstats — Statistics for profilers — Python 3.15.0a6 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">21 22 <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=b86133f3" />23 <link rel="stylesheet" type="text/css" href="../_static/classic.css?v=234b1a7c" />24 <link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=89a2f22a" />25 <link rel="stylesheet" type="text/css" href="../_static/profiling-sampling-visualization.css?v=0c2600ae" />26 <link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css?v=5349f25f" />27 28 <script src="../_static/documentation_options.js?v=6b7c9ff5"></script>29 <script src="../_static/doctools.js?v=9bcbadda"></script>30 <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>31 <script src="../_static/profiling-sampling-visualization.js?v=9811ed04"></script>32 33 <script src="../_static/sidebar.js"></script>34 35 <link rel="search" type="application/opensearchdescription+xml"36 title="Search within Python 3.15.0a6 documentation"37 href="../_static/opensearch.xml"/>38 <link rel="author" title="About these documents" href="../about.html" />39 <link rel="index" title="Index" href="../genindex.html" />40 <link rel="search" title="Search" href="../search.html" />41 <link rel="copyright" title="Copyright" href="../copyright.html" />42 <link rel="next" title="timeit — Measure execution time of small code snippets" href="timeit.html" />43 <link rel="prev" title="profiling.sampling — Statistical profiler" href="profiling.sampling.html" />44 45 46 <script defer file-types="bz2,epub,zip" data-domain="docs.python.org" src="https://analytics.python.org/js/script.file-downloads.outbound-links.js"></script>47 48 <link rel="canonical" href="https://docs.python.org/3/library/pstats.html">49 50 51 52 53 <style>54 @media only screen {55 table.full-width-table {56 width: 100%;57 }58 }59 </style>60<link rel="stylesheet" href="../_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">61 <link rel="shortcut icon" type="image/png" href="../_static/py.svg">62 <script type="text/javascript" src="../_static/copybutton.js"></script>63 <script type="text/javascript" src="../_static/menu.js"></script>64 <script type="text/javascript" src="../_static/search-focus.js"></script>65 <script type="text/javascript" src="../_static/themetoggle.js"></script> 66 <script type="text/javascript" src="../_static/rtd_switcher.js"></script>67 <meta name="readthedocs-addons-api-version" content="1">68 69 </head>70<body>71<div class="mobile-nav">72 <input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"73 aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu">74 <nav class="nav-content" role="navigation">75 <label for="menuToggler" class="toggler__label">76 <span></span>77 </label>78 <span class="nav-items-wrapper">79 <a href="https://www.python.org/" class="nav-logo">80 <img src="../_static/py.svg" alt="Python logo">81 </a>82 <span class="version_switcher_placeholder"></span>83 <form role="search" class="search" action="../search.html" method="get">84 <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">85 <path fill-rule="nonzero" fill="currentColor" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>86 </svg>87 <input placeholder="Quick search" aria-label="Quick search" type="search" name="q">88 <input type="submit" value="Go">89 </form>90 </span>91 </nav>92 <div class="menu-wrapper">93 <nav class="menu" role="navigation" aria-label="main navigation">94 <div class="language_switcher_placeholder"></div>95 96<label class="theme-selector-label">97 Theme98 <select class="theme-selector" oninput="activateTheme(this.value)">99 <option value="auto" selected>Auto</option>100 <option value="light">Light</option>101 <option value="dark">Dark</option>102 </select>103</label>104 <div>105 <h3><a href="../contents.html">Table of Contents</a></h3>106 <ul>107<li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pstats</span></code> — Statistics for profilers</a><ul>108<li><a class="reference internal" href="#reading-and-displaying-profile-data">Reading and displaying profile data</a><ul>109<li><a class="reference internal" href="#working-with-statistics">Working with statistics</a></li>110<li><a class="reference internal" href="#filtering-output">Filtering output</a></li>111<li><a class="reference internal" href="#analyzing-call-relationships">Analyzing call relationships</a></li>112<li><a class="reference internal" href="#combining-multiple-profiles">Combining multiple profiles</a></li>113</ul>114</li>115<li><a class="reference internal" href="#the-stats-class">The <code class="xref py py-class docutils literal notranslate"><span class="pre">Stats</span></code> class</a></li>116<li><a class="reference internal" href="#command-line-interface">Command-line interface</a></li>117</ul>118</li>119</ul>120 121 </div>122 <div>123 <h4>Previous topic</h4>124 <p class="topless"><a href="profiling.sampling.html"125 title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">profiling.sampling</span></code> — Statistical profiler</a></p>126 </div>127 <div>128 <h4>Next topic</h4>129 <p class="topless"><a href="timeit.html"130 title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">timeit</span></code> — Measure execution time of small code snippets</a></p>131 </div>132 <script>133 document.addEventListener('DOMContentLoaded', () => {134 const title = document.querySelector('meta[property="og:title"]').content;135 const elements = document.querySelectorAll('.improvepage');136 const pageurl = window.location.href.split('?')[0];137 elements.forEach(element => {138 const url = new URL(element.href.split('?')[0].replace("-nojs", ""));139 url.searchParams.set('pagetitle', title);140 url.searchParams.set('pageurl', pageurl);141 url.searchParams.set('pagesource', "library/pstats.rst");142 element.href = url.toString();143 });144 });145 </script>146 <div role="note" aria-label="source link">147 <h3>This page</h3>148 <ul class="this-page-menu">149 <li><a href="../bugs.html">Report a bug</a></li>150 <li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>151 <li>152 <a href="https://github.com/python/cpython/blob/main/Doc/library/pstats.rst?plain=1"153 rel="nofollow">Show source154 </a>155 </li>156 157 </ul>158 </div>159 </nav>160 </div>161</div>162 163 164 <div class="related" role="navigation" aria-label="Related">165 <h3>Navigation</h3>166 <ul>167 <li class="right" style="margin-right: 10px">168 <a href="../genindex.html" title="General Index"169 accesskey="I">index</a></li>170 <li class="right" >171 <a href="../py-modindex.html" title="Python Module Index"172 >modules</a> |</li>173 <li class="right" >174 <a href="timeit.html" title="timeit — Measure execution time of small code snippets"175 accesskey="N">next</a> |</li>176 <li class="right" >177 <a href="profiling.sampling.html" title="profiling.sampling — Statistical profiler"178 accesskey="P">previous</a> |</li>179 180 <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"></li>181 <li><a href="https://www.python.org/">Python</a> »</li>182 <li class="switchers">183 <div class="language_switcher_placeholder"></div>184 <div class="version_switcher_placeholder"></div>185 </li>186 <li>187 188 </li>189 <li id="cpython-language-and-version">190 <a href="../index.html">3.15.0a6 Documentation</a> »191 </li>192 193 <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>194 <li class="nav-item nav-item-2"><a href="debug.html" accesskey="U">Debugging and profiling</a> »</li>195 <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">pstats</span></code> — Statistics for profilers</a></li>196 <li class="right">197 198 199 <div class="inline-search" role="search">200 <form class="inline-search" action="../search.html" method="get">201 <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box">202 <input type="submit" value="Go">203 </form>204 </div>205 |206 </li>207 <li class="right">208<label class="theme-selector-label">209 Theme210 <select class="theme-selector" oninput="activateTheme(this.value)">211 <option value="auto" selected>Auto</option>212 <option value="light">Light</option>213 <option value="dark">Dark</option>214 </select>215</label> |</li>216 217 </ul>218 </div> 219 220 <div class="document">221 <div class="documentwrapper">222 <div class="bodywrapper">223 <div class="body" role="main">224 225 <section id="module-pstats">226<span id="pstats-statistics-for-profilers"></span><span id="pstats-module"></span><h1><code class="xref py py-mod docutils literal notranslate"><span class="pre">pstats</span></code> — Statistics for profilers<a class="headerlink" href="#module-pstats" title="Link to this heading">¶</a></h1>227<p><strong>Source code:</strong> <a class="extlink-source reference external" href="https://github.com/python/cpython/tree/main/Lib/pstats.py">Lib/pstats.py</a></p>228<hr class="docutils" />229<p>The <code class="xref py py-mod docutils literal notranslate"><span class="pre">pstats</span></code> module provides tools for reading, manipulating, and230displaying profiling statistics generated by Python’s profilers. It reads231output from both <a class="reference internal" href="profiling.tracing.html#module-profiling.tracing" title="profiling.tracing: Deterministic tracing profiler for Python programs."><code class="xref py py-mod docutils literal notranslate"><span class="pre">profiling.tracing</span></code></a> (deterministic profiler) and232<a class="reference internal" href="profiling.sampling.html#module-profiling.sampling" title="profiling.sampling: Statistical sampling profiler for Python processes."><code class="xref py py-mod docutils literal notranslate"><span class="pre">profiling.sampling</span></code></a> (statistical profiler).</p>233<section id="reading-and-displaying-profile-data">234<h2>Reading and displaying profile data<a class="headerlink" href="#reading-and-displaying-profile-data" title="Link to this heading">¶</a></h2>235<p>The <a class="reference internal" href="#pstats.Stats" title="pstats.Stats"><code class="xref py py-class docutils literal notranslate"><span class="pre">Stats</span></code></a> class is the primary interface for working with profile236data. It can read statistics from files or directly from a237<a class="reference internal" href="profiling.tracing.html#profiling.tracing.Profile" title="profiling.tracing.Profile"><code class="xref py py-class docutils literal notranslate"><span class="pre">Profile</span></code></a> object.</p>238<p>Load statistics from a file and print a basic report:</p>239<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span><span class="w"> </span><span class="nn">pstats</span>240 241<span class="n">p</span> <span class="o">=</span> <span class="n">pstats</span><span class="o">.</span><span class="n">Stats</span><span class="p">(</span><span class="s1">'profile_output.prof'</span><span class="p">)</span>242<span class="n">p</span><span class="o">.</span><span class="n">print_stats</span><span class="p">()</span>243</pre></div>244</div>245<p>The <a class="reference internal" href="#pstats.Stats" title="pstats.Stats"><code class="xref py py-class docutils literal notranslate"><span class="pre">Stats</span></code></a> object provides methods for sorting and filtering the246data before printing. For example, to see the ten functions with the highest247cumulative time:</p>248<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">pstats</span><span class="w"> </span><span class="kn">import</span> <span class="n">SortKey</span>249 250<span class="n">p</span> <span class="o">=</span> <span class="n">pstats</span><span class="o">.</span><span class="n">Stats</span><span class="p">(</span><span class="s1">'profile_output.prof'</span><span class="p">)</span>251<span class="n">p</span><span class="o">.</span><span class="n">sort_stats</span><span class="p">(</span><span class="n">SortKey</span><span class="o">.</span><span class="n">CUMULATIVE</span><span class="p">)</span><span class="o">.</span><span class="n">print_stats</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>252</pre></div>253</div>254<section id="working-with-statistics">255<h3>Working with statistics<a class="headerlink" href="#working-with-statistics" title="Link to this heading">¶</a></h3>256<p>The <a class="reference internal" href="#pstats.Stats" title="pstats.Stats"><code class="xref py py-class docutils literal notranslate"><span class="pre">Stats</span></code></a> class supports method chaining, making it convenient to257perform multiple operations:</p>258<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">p</span> <span class="o">=</span> <span class="n">pstats</span><span class="o">.</span><span class="n">Stats</span><span class="p">(</span><span class="s1">'restats'</span><span class="p">)</span>259<span class="n">p</span><span class="o">.</span><span class="n">strip_dirs</span><span class="p">()</span><span class="o">.</span><span class="n">sort_stats</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">print_stats</span><span class="p">()</span>260</pre></div>261</div>262<p>The <a class="reference internal" href="#pstats.Stats.strip_dirs" title="pstats.Stats.strip_dirs"><code class="xref py py-meth docutils literal notranslate"><span class="pre">strip_dirs()</span></code></a> method removes directory paths from filenames,263making the output more compact. The <a class="reference internal" href="#pstats.Stats.sort_stats" title="pstats.Stats.sort_stats"><code class="xref py py-meth docutils literal notranslate"><span class="pre">sort_stats()</span></code></a> method accepts264various keys to control the sort order.</p>265<p>Different sort keys highlight different aspects of performance:</p>266<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">pstats</span><span class="w"> </span><span class="kn">import</span> <span class="n">SortKey</span>267 268<span class="c1"># Functions that consume the most cumulative time</span>269<span class="n">p</span><span class="o">.</span><span class="n">sort_stats</span><span class="p">(</span><span class="n">SortKey</span><span class="o">.</span><span class="n">CUMULATIVE</span><span class="p">)</span><span class="o">.</span><span class="n">print_stats</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>270 271<span class="c1"># Functions that consume the most time in their own code</span>272<span class="n">p</span><span class="o">.</span><span class="n">sort_stats</span><span class="p">(</span><span class="n">SortKey</span><span class="o">.</span><span class="n">TIME</span><span class="p">)</span><span class="o">.</span><span class="n">print_stats</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>273 274<span class="c1"># Functions sorted by name</span>275<span class="n">p</span><span class="o">.</span><span class="n">sort_stats</span><span class="p">(</span><span class="n">SortKey</span><span class="o">.</span><span class="n">NAME</span><span class="p">)</span><span class="o">.</span><span class="n">print_stats</span><span class="p">()</span>276</pre></div>277</div>278</section>279<section id="filtering-output">280<h3>Filtering output<a class="headerlink" href="#filtering-output" title="Link to this heading">¶</a></h3>281<p>The <a class="reference internal" href="#pstats.Stats.print_stats" title="pstats.Stats.print_stats"><code class="xref py py-meth docutils literal notranslate"><span class="pre">print_stats()</span></code></a> method accepts restrictions that filter282which functions are displayed. Restrictions can be integers (limiting the283count), floats between 0 and 1 (selecting a percentage), or strings (matching284function names via regular expression).</p>285<p>Print only the top 10%:</p>286<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">p</span><span class="o">.</span><span class="n">print_stats</span><span class="p">(</span><span class="mf">.1</span><span class="p">)</span>287</pre></div>288</div>289<p>Print only functions whose names contain “init”:</p>290<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">p</span><span class="o">.</span><span class="n">print_stats</span><span class="p">(</span><span class="s1">'init'</span><span class="p">)</span>291</pre></div>292</div>293<p>Combine restrictions (they apply sequentially):</p>294<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="c1"># Top 10%, then only those containing "init"</span>295<span class="n">p</span><span class="o">.</span><span class="n">print_stats</span><span class="p">(</span><span class="mf">.1</span><span class="p">,</span> <span class="s1">'init'</span><span class="p">)</span>296 297<span class="c1"># Functions in files matching "foo:", limited to top 50%</span>298<span class="n">p</span><span class="o">.</span><span class="n">sort_stats</span><span class="p">(</span><span class="n">SortKey</span><span class="o">.</span><span class="n">FILENAME</span><span class="p">)</span><span class="o">.</span><span class="n">print_stats</span><span class="p">(</span><span class="s1">'foo:'</span><span class="p">,</span> <span class="mf">.5</span><span class="p">)</span>299</pre></div>300</div>301</section>302<section id="analyzing-call-relationships">303<h3>Analyzing call relationships<a class="headerlink" href="#analyzing-call-relationships" title="Link to this heading">¶</a></h3>304<p>The <a class="reference internal" href="#pstats.Stats.print_callers" title="pstats.Stats.print_callers"><code class="xref py py-meth docutils literal notranslate"><span class="pre">print_callers()</span></code></a> method shows which functions called each305displayed function:</p>306<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">p</span><span class="o">.</span><span class="n">print_callers</span><span class="p">()</span>307</pre></div>308</div>309<p>The <a class="reference internal" href="#pstats.Stats.print_callees" title="pstats.Stats.print_callees"><code class="xref py py-meth docutils literal notranslate"><span class="pre">print_callees()</span></code></a> method shows the opposite relationship,310listing which functions each displayed function called:</p>311<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">p</span><span class="o">.</span><span class="n">print_callees</span><span class="p">()</span>312</pre></div>313</div>314<p>Both methods accept the same restriction arguments as <a class="reference internal" href="#pstats.Stats.print_stats" title="pstats.Stats.print_stats"><code class="xref py py-meth docutils literal notranslate"><span class="pre">print_stats()</span></code></a>.</p>315</section>316<section id="combining-multiple-profiles">317<h3>Combining multiple profiles<a class="headerlink" href="#combining-multiple-profiles" title="Link to this heading">¶</a></h3>318<p>Statistics from multiple profiling runs can be combined into a single319<a class="reference internal" href="#pstats.Stats" title="pstats.Stats"><code class="xref py py-class docutils literal notranslate"><span class="pre">Stats</span></code></a> object:</p>320<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="c1"># Load multiple files at once</span>321<span class="n">p</span> <span class="o">=</span> <span class="n">pstats</span><span class="o">.</span><span class="n">Stats</span><span class="p">(</span><span class="s1">'run1.prof'</span><span class="p">,</span> <span class="s1">'run2.prof'</span><span class="p">,</span> <span class="s1">'run3.prof'</span><span class="p">)</span>322 323<span class="c1"># Or add files incrementally</span>324<span class="n">p</span> <span class="o">=</span> <span class="n">pstats</span><span class="o">.</span><span class="n">Stats</span><span class="p">(</span><span class="s1">'run1.prof'</span><span class="p">)</span>325<span class="n">p</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s1">'run2.prof'</span><span class="p">)</span>326<span class="n">p</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="s1">'run3.prof'</span><span class="p">)</span>327</pre></div>328</div>329<p>When files are combined, statistics for identical functions (same file, line,330and name) are accumulated, giving an aggregate view across all profiling runs.</p>331</section>332</section>333<section id="the-stats-class">334<h2>The <code class="xref py py-class docutils literal notranslate"><span class="pre">Stats</span></code> class<a class="headerlink" href="#the-stats-class" title="Link to this heading">¶</a></h2>335<dl class="py class">336<dt class="sig sig-object py" id="pstats.Stats">337<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pstats.</span></span><span class="sig-name descname"><span class="pre">Stats</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">filenames_or_profile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">stream</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">sys.stdout</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats" title="Link to this definition">¶</a></dt>338<dd><p>Create a statistics object from profile data.</p>339<p>The arguments can be filenames (strings or path-like objects) or340<a class="reference internal" href="profiling.tracing.html#profiling.tracing.Profile" title="profiling.tracing.Profile"><code class="xref py py-class docutils literal notranslate"><span class="pre">Profile</span></code></a> objects. If multiple sources are341provided, their statistics are combined.</p>342<p>The <em>stream</em> argument specifies where output from <a class="reference internal" href="#pstats.Stats.print_stats" title="pstats.Stats.print_stats"><code class="xref py py-meth docutils literal notranslate"><span class="pre">print_stats()</span></code></a> and343related methods is written. It defaults to <a class="reference internal" href="sys.html#sys.stdout" title="sys.stdout"><code class="xref py py-data docutils literal notranslate"><span class="pre">sys.stdout</span></code></a>.</p>344<p>The profile data format is specific to the Python version that created it.345There is no compatibility guarantee between Python versions or between346different profilers.</p>347<dl class="py method">348<dt class="sig sig-object py" id="pstats.Stats.strip_dirs">349<span class="sig-name descname"><span class="pre">strip_dirs</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats.strip_dirs" title="Link to this definition">¶</a></dt>350<dd><p>Remove leading path information from all filenames.</p>351<p>This method modifies the object in place and returns it for method352chaining. After stripping, the statistics are considered to be in353random order.</p>354<p>If stripping causes two functions to become indistinguishable (same355filename, line number, and function name), their statistics are356combined into a single entry.</p>357</dd></dl>358 359<dl class="py method">360<dt class="sig sig-object py" id="pstats.Stats.add">361<span class="sig-name descname"><span class="pre">add</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">filenames</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats.add" title="Link to this definition">¶</a></dt>362<dd><p>Add profiling data from additional files.</p>363<p>The files must have been created by the same profiler type. Statistics364for identical functions are accumulated.</p>365</dd></dl>366 367<dl class="py method">368<dt class="sig sig-object py" id="pstats.Stats.dump_stats">369<span class="sig-name descname"><span class="pre">dump_stats</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats.dump_stats" title="Link to this definition">¶</a></dt>370<dd><p>Save the current statistics to a file.</p>371<p>The file is created if it does not exist and overwritten if it does.372The saved data can be loaded by creating a new <code class="xref py py-class docutils literal notranslate"><span class="pre">Stats</span></code> object.</p>373</dd></dl>374 375<dl class="py method">376<dt class="sig sig-object py" id="pstats.Stats.sort_stats">377<span class="sig-name descname"><span class="pre">sort_stats</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">keys</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats.sort_stats" title="Link to this definition">¶</a></dt>378<dd><p>Sort the statistics according to the specified criteria.</p>379<p>Each key can be a string or a <a class="reference internal" href="#pstats.SortKey" title="pstats.SortKey"><code class="xref py py-class docutils literal notranslate"><span class="pre">SortKey</span></code></a> enum member. When380multiple keys are provided, later keys break ties in earlier keys.</p>381<p>Using <a class="reference internal" href="#pstats.SortKey" title="pstats.SortKey"><code class="xref py py-class docutils literal notranslate"><span class="pre">SortKey</span></code></a> enum members is preferred over strings as it382provides better error checking:</p>383<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span><span class="w"> </span><span class="nn">pstats</span><span class="w"> </span><span class="kn">import</span> <span class="n">SortKey</span>384<span class="n">p</span><span class="o">.</span><span class="n">sort_stats</span><span class="p">(</span><span class="n">SortKey</span><span class="o">.</span><span class="n">CUMULATIVE</span><span class="p">)</span>385</pre></div>386</div>387<p>Valid sort keys:</p>388<table class="docutils align-default">389<thead>390<tr class="row-odd"><th class="head"><p>String</p></th>391<th class="head"><p>Enum</p></th>392<th class="head"><p>Meaning</p></th>393</tr>394</thead>395<tbody>396<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">'calls'</span></code></p></td>397<td><p><code class="docutils literal notranslate"><span class="pre">SortKey.CALLS</span></code></p></td>398<td><p>call count</p></td>399</tr>400<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">'cumulative'</span></code></p></td>401<td><p><code class="docutils literal notranslate"><span class="pre">SortKey.CUMULATIVE</span></code></p></td>402<td><p>cumulative time</p></td>403</tr>404<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">'cumtime'</span></code></p></td>405<td><p>N/A</p></td>406<td><p>cumulative time</p></td>407</tr>408<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">'file'</span></code></p></td>409<td><p>N/A</p></td>410<td><p>file name</p></td>411</tr>412<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">'filename'</span></code></p></td>413<td><p><code class="docutils literal notranslate"><span class="pre">SortKey.FILENAME</span></code></p></td>414<td><p>file name</p></td>415</tr>416<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">'module'</span></code></p></td>417<td><p>N/A</p></td>418<td><p>file name</p></td>419</tr>420<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">'ncalls'</span></code></p></td>421<td><p>N/A</p></td>422<td><p>call count</p></td>423</tr>424<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">'pcalls'</span></code></p></td>425<td><p><code class="docutils literal notranslate"><span class="pre">SortKey.PCALLS</span></code></p></td>426<td><p>primitive call count</p></td>427</tr>428<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">'line'</span></code></p></td>429<td><p><code class="docutils literal notranslate"><span class="pre">SortKey.LINE</span></code></p></td>430<td><p>line number</p></td>431</tr>432<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">'name'</span></code></p></td>433<td><p><code class="docutils literal notranslate"><span class="pre">SortKey.NAME</span></code></p></td>434<td><p>function name</p></td>435</tr>436<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">'nfl'</span></code></p></td>437<td><p><code class="docutils literal notranslate"><span class="pre">SortKey.NFL</span></code></p></td>438<td><p>name/file/line</p></td>439</tr>440<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">'stdname'</span></code></p></td>441<td><p><code class="docutils literal notranslate"><span class="pre">SortKey.STDNAME</span></code></p></td>442<td><p>standard name</p></td>443</tr>444<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">'time'</span></code></p></td>445<td><p><code class="docutils literal notranslate"><span class="pre">SortKey.TIME</span></code></p></td>446<td><p>internal time</p></td>447</tr>448<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">'tottime'</span></code></p></td>449<td><p>N/A</p></td>450<td><p>internal time</p></td>451</tr>452</tbody>453</table>454<p>All sorts on statistics are in descending order (most time consuming455first), while name, file, and line number sorts are ascending456(alphabetical).</p>457<p>The difference between <code class="docutils literal notranslate"><span class="pre">SortKey.NFL</span></code> and <code class="docutils literal notranslate"><span class="pre">SortKey.STDNAME</span></code> is that458NFL sorts line numbers numerically while STDNAME sorts them as strings.459<code class="docutils literal notranslate"><span class="pre">sort_stats(SortKey.NFL)</span></code> is equivalent to460<code class="docutils literal notranslate"><span class="pre">sort_stats(SortKey.NAME,</span> <span class="pre">SortKey.FILENAME,</span> <span class="pre">SortKey.LINE)</span></code>.</p>461<p>For backward compatibility, the numeric arguments <code class="docutils literal notranslate"><span class="pre">-1</span></code>, <code class="docutils literal notranslate"><span class="pre">0</span></code>, <code class="docutils literal notranslate"><span class="pre">1</span></code>,462and <code class="docutils literal notranslate"><span class="pre">2</span></code> are also accepted, meaning <code class="docutils literal notranslate"><span class="pre">'stdname'</span></code>, <code class="docutils literal notranslate"><span class="pre">'calls'</span></code>,463<code class="docutils literal notranslate"><span class="pre">'time'</span></code>, and <code class="docutils literal notranslate"><span class="pre">'cumulative'</span></code> respectively.</p>464<div class="versionadded">465<p><span class="versionmodified added">Added in version 3.7: </span>The <a class="reference internal" href="#pstats.SortKey" title="pstats.SortKey"><code class="xref py py-class docutils literal notranslate"><span class="pre">SortKey</span></code></a> enum.</p>466</div>467</dd></dl>468 469<dl class="py method">470<dt class="sig sig-object py" id="pstats.Stats.reverse_order">471<span class="sig-name descname"><span class="pre">reverse_order</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats.reverse_order" title="Link to this definition">¶</a></dt>472<dd><p>Reverse the current sort order.</p>473<p>By default, the sort direction is chosen appropriately for the sort key474(descending for time-based keys, ascending for name-based keys). This475method inverts that choice.</p>476</dd></dl>477 478<dl class="py method">479<dt class="sig sig-object py" id="pstats.Stats.print_stats">480<span class="sig-name descname"><span class="pre">print_stats</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">restrictions</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats.print_stats" title="Link to this definition">¶</a></dt>481<dd><p>Print a report of the profiling statistics.</p>482<p>The output includes a header line summarizing the data, followed by a483table of function statistics sorted according to the last484<a class="reference internal" href="#pstats.Stats.sort_stats" title="pstats.Stats.sort_stats"><code class="xref py py-meth docutils literal notranslate"><span class="pre">sort_stats()</span></code></a> call.</p>485<p>Restrictions filter the output. Each restriction is either:</p>486<ul class="simple">487<li><p>An integer: limits output to that many entries</p></li>488<li><p>A float between 0.0 and 1.0: selects that fraction of entries</p></li>489<li><p>A string: matches function names via regular expression</p></li>490</ul>491<p>Restrictions are applied sequentially. For example:</p>492<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">print_stats</span><span class="p">(</span><span class="mf">.1</span><span class="p">,</span> <span class="s1">'foo:'</span><span class="p">)</span>493</pre></div>494</div>495<p>First limits to the top 10%, then filters to functions matching ‘foo:’.</p>496</dd></dl>497 498<dl class="py method">499<dt class="sig sig-object py" id="pstats.Stats.print_callers">500<span class="sig-name descname"><span class="pre">print_callers</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">restrictions</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats.print_callers" title="Link to this definition">¶</a></dt>501<dd><p>Print the callers of each function in the statistics.</p>502<p>For each function in the filtered results, shows which functions called503it and how often.</p>504<p>With <a class="reference internal" href="profiling.tracing.html#module-profiling.tracing" title="profiling.tracing: Deterministic tracing profiler for Python programs."><code class="xref py py-mod docutils literal notranslate"><span class="pre">profiling.tracing</span></code></a> (or <code class="docutils literal notranslate"><span class="pre">cProfile</span></code>), each caller line505shows three numbers: the number of calls from that caller, and the506total and cumulative times for those specific calls.</p>507<p>Accepts the same restriction arguments as <a class="reference internal" href="#pstats.Stats.print_stats" title="pstats.Stats.print_stats"><code class="xref py py-meth docutils literal notranslate"><span class="pre">print_stats()</span></code></a>.</p>508</dd></dl>509 510<dl class="py method">511<dt class="sig sig-object py" id="pstats.Stats.print_callees">512<span class="sig-name descname"><span class="pre">print_callees</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">restrictions</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats.print_callees" title="Link to this definition">¶</a></dt>513<dd><p>Print the functions called by each function in the statistics.</p>514<p>This is the inverse of <a class="reference internal" href="#pstats.Stats.print_callers" title="pstats.Stats.print_callers"><code class="xref py py-meth docutils literal notranslate"><span class="pre">print_callers()</span></code></a>, showing which functions515each listed function called.</p>516<p>Accepts the same restriction arguments as <a class="reference internal" href="#pstats.Stats.print_stats" title="pstats.Stats.print_stats"><code class="xref py py-meth docutils literal notranslate"><span class="pre">print_stats()</span></code></a>.</p>517</dd></dl>518 519<dl class="py method">520<dt class="sig sig-object py" id="pstats.Stats.get_stats_profile">521<span class="sig-name descname"><span class="pre">get_stats_profile</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pstats.Stats.get_stats_profile" title="Link to this definition">¶</a></dt>522<dd><p>Return a <code class="docutils literal notranslate"><span class="pre">StatsProfile</span></code> object containing the statistics.</p>523<p>The returned object provides programmatic access to the profile data,524with function names mapped to <code class="docutils literal notranslate"><span class="pre">FunctionProfile</span></code> objects525containing timing and call count information.</p>526<div class="versionadded">527<p><span class="versionmodified added">Added in version 3.9.</span></p>528</div>529</dd></dl>530 531</dd></dl>532 533<dl class="py class">534<dt class="sig sig-object py" id="pstats.SortKey">535<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pstats.</span></span><span class="sig-name descname"><span class="pre">SortKey</span></span><a class="headerlink" href="#pstats.SortKey" title="Link to this definition">¶</a></dt>536<dd><p>An enumeration of valid sort keys for <a class="reference internal" href="#pstats.Stats.sort_stats" title="pstats.Stats.sort_stats"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Stats.sort_stats()</span></code></a>.</p>537<dl class="py attribute">538<dt class="sig sig-object py" id="pstats.SortKey.CALLS">539<span class="sig-name descname"><span class="pre">CALLS</span></span><a class="headerlink" href="#pstats.SortKey.CALLS" title="Link to this definition">¶</a></dt>540<dd><p>Sort by call count.</p>541</dd></dl>542 543<dl class="py attribute">544<dt class="sig sig-object py" id="pstats.SortKey.CUMULATIVE">545<span class="sig-name descname"><span class="pre">CUMULATIVE</span></span><a class="headerlink" href="#pstats.SortKey.CUMULATIVE" title="Link to this definition">¶</a></dt>546<dd><p>Sort by cumulative time.</p>547</dd></dl>548 549<dl class="py attribute">550<dt class="sig sig-object py" id="pstats.SortKey.FILENAME">551<span class="sig-name descname"><span class="pre">FILENAME</span></span><a class="headerlink" href="#pstats.SortKey.FILENAME" title="Link to this definition">¶</a></dt>552<dd><p>Sort by file name.</p>553</dd></dl>554 555<dl class="py attribute">556<dt class="sig sig-object py" id="pstats.SortKey.LINE">557<span class="sig-name descname"><span class="pre">LINE</span></span><a class="headerlink" href="#pstats.SortKey.LINE" title="Link to this definition">¶</a></dt>558<dd><p>Sort by line number.</p>559</dd></dl>560 561<dl class="py attribute">562<dt class="sig sig-object py" id="pstats.SortKey.NAME">563<span class="sig-name descname"><span class="pre">NAME</span></span><a class="headerlink" href="#pstats.SortKey.NAME" title="Link to this definition">¶</a></dt>564<dd><p>Sort by function name.</p>565</dd></dl>566 567<dl class="py attribute">568<dt class="sig sig-object py" id="pstats.SortKey.NFL">569<span class="sig-name descname"><span class="pre">NFL</span></span><a class="headerlink" href="#pstats.SortKey.NFL" title="Link to this definition">¶</a></dt>570<dd><p>Sort by name, then file, then line number (numeric line sort).</p>571</dd></dl>572 573<dl class="py attribute">574<dt class="sig sig-object py" id="pstats.SortKey.PCALLS">575<span class="sig-name descname"><span class="pre">PCALLS</span></span><a class="headerlink" href="#pstats.SortKey.PCALLS" title="Link to this definition">¶</a></dt>576<dd><p>Sort by primitive (non-recursive) call count.</p>577</dd></dl>578 579<dl class="py attribute">580<dt class="sig sig-object py" id="pstats.SortKey.STDNAME">581<span class="sig-name descname"><span class="pre">STDNAME</span></span><a class="headerlink" href="#pstats.SortKey.STDNAME" title="Link to this definition">¶</a></dt>582<dd><p>Sort by standard name (string-based line sort).</p>583</dd></dl>584 585<dl class="py attribute">586<dt class="sig sig-object py" id="pstats.SortKey.TIME">587<span class="sig-name descname"><span class="pre">TIME</span></span><a class="headerlink" href="#pstats.SortKey.TIME" title="Link to this definition">¶</a></dt>588<dd><p>Sort by internal time (time in function excluding subcalls).</p>589</dd></dl>590 591</dd></dl>592 593</section>594<section id="command-line-interface">595<span id="pstats-cli"></span><h2>Command-line interface<a class="headerlink" href="#command-line-interface" title="Link to this heading">¶</a></h2>596<p>The <code class="xref py py-mod docutils literal notranslate"><span class="pre">pstats</span></code> module can be invoked as a script to interactively browse597profile data:</p>598<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="o">-</span><span class="n">m</span> <span class="n">pstats</span> <span class="n">profile_output</span><span class="o">.</span><span class="n">prof</span>599</pre></div>600</div>601<p>This opens a line-oriented interface (built on <a class="reference internal" href="cmd.html#module-cmd" title="cmd: Build line-oriented command interpreters."><code class="xref py py-mod docutils literal notranslate"><span class="pre">cmd</span></code></a>) for examining the602statistics. Type <code class="docutils literal notranslate"><span class="pre">help</span></code> at the prompt for available commands.</p>603<div class="admonition seealso">604<p class="admonition-title">See also</p>605<dl class="simple">606<dt><a class="reference internal" href="profiling.html#module-profiling" title="profiling: Python profiling tools for performance analysis."><code class="xref py py-mod docutils literal notranslate"><span class="pre">profiling</span></code></a></dt><dd><p>Overview of Python profiling tools.</p>607</dd>608<dt><a class="reference internal" href="profiling.tracing.html#module-profiling.tracing" title="profiling.tracing: Deterministic tracing profiler for Python programs."><code class="xref py py-mod docutils literal notranslate"><span class="pre">profiling.tracing</span></code></a></dt><dd><p>Deterministic tracing profiler.</p>609</dd>610<dt><a class="reference internal" href="profiling.sampling.html#module-profiling.sampling" title="profiling.sampling: Statistical sampling profiler for Python processes."><code class="xref py py-mod docutils literal notranslate"><span class="pre">profiling.sampling</span></code></a></dt><dd><p>Statistical sampling profiler.</p>611</dd>612</dl>613</div>614</section>615</section>616 617 618 <div class="clearer"></div>619 </div>620 </div>621 </div>622 <div class="sphinxsidebar" role="navigation" aria-label="Main">623 <div class="sphinxsidebarwrapper">624 <div>625 <h3><a href="../contents.html">Table of Contents</a></h3>626 <ul>627<li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pstats</span></code> — Statistics for profilers</a><ul>628<li><a class="reference internal" href="#reading-and-displaying-profile-data">Reading and displaying profile data</a><ul>629<li><a class="reference internal" href="#working-with-statistics">Working with statistics</a></li>630<li><a class="reference internal" href="#filtering-output">Filtering output</a></li>631<li><a class="reference internal" href="#analyzing-call-relationships">Analyzing call relationships</a></li>632<li><a class="reference internal" href="#combining-multiple-profiles">Combining multiple profiles</a></li>633</ul>634</li>635<li><a class="reference internal" href="#the-stats-class">The <code class="xref py py-class docutils literal notranslate"><span class="pre">Stats</span></code> class</a></li>636<li><a class="reference internal" href="#command-line-interface">Command-line interface</a></li>637</ul>638</li>639</ul>640 641 </div>642 <div>643 <h4>Previous topic</h4>644 <p class="topless"><a href="profiling.sampling.html"645 title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">profiling.sampling</span></code> — Statistical profiler</a></p>646 </div>647 <div>648 <h4>Next topic</h4>649 <p class="topless"><a href="timeit.html"650 title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">timeit</span></code> — Measure execution time of small code snippets</a></p>651 </div>652 <script>653 document.addEventListener('DOMContentLoaded', () => {654 const title = document.querySelector('meta[property="og:title"]').content;655 const elements = document.querySelectorAll('.improvepage');656 const pageurl = window.location.href.split('?')[0];657 elements.forEach(element => {658 const url = new URL(element.href.split('?')[0].replace("-nojs", ""));659 url.searchParams.set('pagetitle', title);660 url.searchParams.set('pageurl', pageurl);661 url.searchParams.set('pagesource', "library/pstats.rst");662 element.href = url.toString();663 });664 });665 </script>666 <div role="note" aria-label="source link">667 <h3>This page</h3>668 <ul class="this-page-menu">669 <li><a href="../bugs.html">Report a bug</a></li>670 <li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>671 <li>672 <a href="https://github.com/python/cpython/blob/main/Doc/library/pstats.rst?plain=1"673 rel="nofollow">Show source674 </a>675 </li>676 677 </ul>678 </div>679 </div>680<div id="sidebarbutton" title="Collapse sidebar">681<span>«</span>682</div>683 684 </div>685 <div class="clearer"></div>686 </div> 687 <div class="related" role="navigation" aria-label="Related">688 <h3>Navigation</h3>689 <ul>690 <li class="right" style="margin-right: 10px">691 <a href="../genindex.html" title="General Index"692 >index</a></li>693 <li class="right" >694 <a href="../py-modindex.html" title="Python Module Index"695 >modules</a> |</li>696 <li class="right" >697 <a href="timeit.html" title="timeit — Measure execution time of small code snippets"698 >next</a> |</li>699 <li class="right" >700 <a href="profiling.sampling.html" title="profiling.sampling — Statistical profiler"701 >previous</a> |</li>702 703 <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"></li>704 <li><a href="https://www.python.org/">Python</a> »</li>705 <li class="switchers">706 <div class="language_switcher_placeholder"></div>707 <div class="version_switcher_placeholder"></div>708 </li>709 <li>710 711 </li>712 <li id="cpython-language-and-version">713 <a href="../index.html">3.15.0a6 Documentation</a> »714 </li>715 716 <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>717 <li class="nav-item nav-item-2"><a href="debug.html" >Debugging and profiling</a> »</li>718 <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">pstats</span></code> — Statistics for profilers</a></li>719 <li class="right">720 721 722 <div class="inline-search" role="search">723 <form class="inline-search" action="../search.html" method="get">724 <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box">725 <input type="submit" value="Go">726 </form>727 </div>728 |729 </li>730 <li class="right">731<label class="theme-selector-label">732 Theme733 <select class="theme-selector" oninput="activateTheme(this.value)">734 <option value="auto" selected>Auto</option>735 <option value="light">Light</option>736 <option value="dark">Dark</option>737 </select>738</label> |</li>739 740 </ul>741 </div> 742 <div class="footer">743 © <a href="../copyright.html">Copyright</a> 2001 Python Software Foundation.744 <br>745 This page is licensed under the Python Software Foundation License Version 2.746 <br>747 Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.748 <br>749 750 See <a href="/license.html">History and License</a> for more information.<br>751 752 753 <br>754 755 The Python Software Foundation is a non-profit corporation.756<a href="https://www.python.org/psf/donations/">Please donate.</a>757<br>758 <br>759 Last updated on Mar 10, 2026 (08:58 UTC).760 761 <a href="/bugs.html">Found a bug</a>?762 763 <br>764 765 Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.766 </div>767 768 </body>769</html>