-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLI to plot memory monitors #5807
Conversation
PROPERTIES | ||
TIMEOUT 40 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, the command itself takes a very long time to run. I wasn't able to determine why, even with spectre --profile
. Any suggestions of where I'm going wrong are welcome.
I'll let @nilsvu review the actual code, but I have a feature request: would it be easy to add a flag like |
Good idea, and/or how about a stacked area plot like this: https://python-graph-gallery.com/stacked-area-plot/ |
I'd be fine with adding that as an option. I do find it easier in the current style to read off how many GB something is using. I think the stacked plot makes relative comparisons nice, though. So maybe a CLI flag to enable the stacking? E.g. |
I'm personally not a big fan of the stacked plot. It's a bit ambiguous to me whether to interpret a stack as relative to zero, or relative to the stack below it. I do like the |
True. Maybe just combine the entries with only a couple percent into a single entry, then you don't need an extra CLI option and you can't see those small entries in the plot anyway. Also sort the entries. |
1ce53eb
to
6fd0ea5
Compare
LGTM, once @nilsvu is happy with the python code, please go ahead and merge. No need for my approval. |
) | ||
# Plotting options | ||
@click.option( | ||
"--use-mb/--use-gb", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove this. Either make it always GB or switch to MB if the total memory is below 1 GB. This is just another option the person using this has to learn and set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to keep this one. I did make the default GB though since that's more likely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some simplifications with pandas. You can squash everything.
ax.plot( | ||
totals_df["Time"], | ||
totals_df[component] / divisor, | ||
linewidth=0.2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the line width needed because the time sampling is so dense? Generally better to leave style up to the stylesheet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this so the total line would stand out in comparison to the other lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, maybe the color is enough? Up to you.
47372cb
to
d425ab4
Compare
Proposed changes
Examples of output:
no_color.pdf
with_color.pdf
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments