UCL / TLOmodel-profiling

Profiling outputs for developer use
0 stars 0 forks source link

Render memory plots #17

Closed willGraham01 closed 4 months ago

willGraham01 commented 4 months ago

For https://github.com/UCL/TLOmodel/issues/1355 |

Edits the "run statistics" page to display the captured memory statistics, which the profiling runs were previously capturing but not displaying.

Making this it's own PR as the "run statistics" page is starting to get a bit bloated - it has no internal navigation but scrolling through the plots is quite a chore.

Opinions on this welcome :smile:

Stats we're now plotting

The following (plottable) statistics are being captured by the profiling run; and those with a checked box are currently being plotted (includes those added by this PR):

willGraham01 commented 4 months ago

Have added the contents page - repo setting require an up-to-date review so sorry for notification noise :sweat_smile:

tamuri commented 4 months ago

Opinions on this welcome

Take inspiration from craigslist - single line of anchor links across the top, pls.

willGraham01 commented 4 months ago

single line of anchor links across the top, pls.

Matt's .. contents:: suggestion generates a vertical list of links at the top:

image

And makes the individual plot titles themselves clickable, which links you back to the contents at the top of the page.

I know this isn't a single line of links, but my niave search of the sphinx documentation isn't giving me any promising results for formatting the table of contents horizontally rather than vertically. hlist is for manual lists, and contents itself doesn't have any formatting options.

I can make the website builder itself write a horizontal bar, but is there any value in doing that over using what sphinx already provides in two lines?

matt-graham commented 4 months ago

Adding some custom CSS similar to

#list-of-summary-statistics ul {
    list-style: none;
    padding: 0;
}

#list-of-summary-statistics li {
    display: inline;
    margin-right: 10px;
}

#list-of-summary-statistics li p {
    display: inline;
}

would make the list items displayed inline (the li p entry is needed as weirdly Sphinx seems to wrap the titles in the list items in a p tag for some reason), though still not on a single line as too many

image

I prefer the Sphinx default that @willGraham01 currently has though of items on separate lines as easier to scan through

tamuri commented 4 months ago

The Sphinx output is fine - thanks!