question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show memory usage in build output

See original GitHub issue

The show_memory option is cumbersome to work with - I want to see which examples have high memory consumption and I do not want to look through each page in the gallery to find out the memory usage.

Can you all output the memory usage in the build output similar to how execution times are shown and perhaps sort them from high to low useage?

It’d be nice if the output was formatted more clearly into a raw text table. Maybe something like:

example execution summary:
            Filename                        Time        Memory
    - ../examples/02-plot/orbit.py         39 sec       282 MB
    - ../examples/02-plot/opacity.py       22 sec       250 MB
    - ../examples/02-plot/lighting.py      21 sec       300 MB
    - ../examples/02-plot/texture.py       20 sec       133 MB
    - ../examples/01-filter/slicing.py     19 sec        85 MB

Also, every so often I run into an issue with zombie threads - anyone else experience ths when using 'show_memory': True:

(dev) ➜  docs git:(patch/subplot) ✗ rm -r examples
(dev) ➜  docs git:(master) ✗ make html
Running Sphinx v2.1.2
Adding copy buttons to code blocks...
loading pickled environment... done
generating gallery...

Exception occurred:
  File "/Users/bane/.local/lib/python3.7/site-packages/psutil/_psosx.py", line 370, in catch_zombie
    raise ZombieProcess(proc.pid, proc._name, proc._ppid)
psutil.ZombieProcess: psutil.ZombieProcess process still exists but it's a zombie (pid=71575)
The full traceback has been saved in /var/folders/2x/4df66vz13pv4hj_ysv23tyyc0000gn/T/sphinx-err-8aw1_qos.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [html] Error 2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
larsonercommented, Aug 1, 2019

I’d rather add them to this page:

https://sphinx-gallery.github.io/auto_examples/sg_execution_times.html

It’s documented here in a .. note::, perhaps not prominently enough:

https://sphinx-gallery.github.io/configuration.html#manage-multiple-galleries

Maybe we should actually reformat it as a table with name/time/memory (if applicable) as columns.

I have not seen this zombie thread warning that I know of. Then again I have not spent much time building docs on macOS machines.

0reactions
banesullivancommented, Aug 1, 2019

That sounds good to me!

If sorting is more work than anyone has time to implement, I’d be happy leaving it sorted by execution time as long as the table has the time and memory use

Read more comments on GitHub >

github_iconTop Results From Across the Web

Atmel Studio 7 - Build Output View - Memory Usage Break-up
This article shows how to interpret the memory usage values printed in Atmel Studio - project build output.
Read more >
Measure memory usage in your apps - Visual Studio (Windows)
Measure memory usage in Visual Studio (C#, Visual Basic, C++, F#) ... To bring up the window again, click Debug > Windows >...
Read more >
5 Commands for Checking Memory Usage in Linux
Let's dig into the various Linux command-line tools to help you check into system memory usage. These tools aren't terribly hard to use, ......
Read more >
Checking memory usage - High Performance Computing Facility
The easiest way to check the memory usage of a running process is to use the interactive “top” command. At the command line,...
Read more >
HOWTO: Display Percentage Of Memory Usage At End Of Build
Now build the project and see the memory usage information displayed in the Console window. image.png.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found