|
54 | 54 |
|
55 | 55 | <body>
|
56 | 56 | <header>
|
57 |
| - <aside>March 9, 2024</aside> |
| 57 | + <aside>March 11, 2024</aside> |
58 | 58 | <a href="https://gto76.github.io" rel="author">Jure Šorn</a>
|
59 | 59 | </header>
|
60 | 60 |
|
@@ -2157,12 +2157,12 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
|
2157 | 2157 | 4 1 534.1 534.1 67.8 b = set(range(10000))
|
2158 | 2158 | </code></pre></div>
|
2159 | 2159 |
|
2160 |
| -<div><h3 id="callandflamegraphs">Call and Flame Graphs</h3><pre><code class="text language-text">$ apt/brew install graphviz && pip3 install gprof2dot snakeviz |
2161 |
| -$ tail --lines=4 test.py > test.py |
2162 |
| -$ python3 -m cProfile -o test.prof test.py |
2163 |
| -$ gprof2dot --format=pstats test.prof | dot -T png -o test.png |
2164 |
| -$ xdg-open/open test.png |
2165 |
| -$ snakeviz test.prof |
| 2160 | +<div><h3 id="callandflamegraphs">Call and Flame Graphs</h3><pre><code class="bash language-bash hljs">$ apt/brew install graphviz && pip3 install gprof2dot snakeviz <span class="hljs-comment"># Or download installer.</span> |
| 2161 | +$ tail --lines=4 test.py > test.py <span class="hljs-comment"># Removes first line.</span> |
| 2162 | +$ python3 -m cProfile -o test.prof test.py <span class="hljs-comment"># Runs built-in profiler.</span> |
| 2163 | +$ gprof2dot --format=pstats test.prof | dot -T png -o test.png <span class="hljs-comment"># Generates call graph.</span> |
| 2164 | +$ xdg-open/open test.png <span class="hljs-comment"># Displays call graph.</span> |
| 2165 | +$ snakeviz test.prof <span class="hljs-comment"># Displays flame graph.</span> |
2166 | 2166 | </code></pre></div>
|
2167 | 2167 |
|
2168 | 2168 | <div><h3 id="samplingandmemoryprofilers">Sampling and Memory Profilers</h3><pre><code class="text language-text">┏━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━┓
|
@@ -2935,7 +2935,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
|
2935 | 2935 |
|
2936 | 2936 |
|
2937 | 2937 | <footer>
|
2938 |
| - <aside>March 9, 2024</aside> |
| 2938 | + <aside>March 11, 2024</aside> |
2939 | 2939 | <a href="https://gto76.github.io" rel="author">Jure Šorn</a>
|
2940 | 2940 | </footer>
|
2941 | 2941 |
|
|
0 commit comments