Skip to content
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

Support multiple plots #232

Merged
merged 13 commits into from
Aug 1, 2023
Merged

Support multiple plots #232

merged 13 commits into from
Aug 1, 2023

Conversation

Cossack42
Copy link
Contributor

@Cossack42 Cossack42 commented Jul 26, 2023

Multiple Plots

This allows the user to plot multiple prmon files on the same graph.

As part of this we have divided the main function into separate sub-functions.

Results

When graphing one set of data, the syntax of the input remains the same. The graphs on the original post are reproducible using the updated program.

Inputting multiple sets of data (by separating the filenames using commas) allows the plotting of multiple data sets on the same set of axes. For multiple data sets, dotted and dashed lines are used to distinguish each data set.

  • CPU-time as a function of wall-time:

prmon_plot.py --input prmon.txt,prmon.txt.1 --xvar wtime --yvar vmem,pss,rss,swap --yunit GB

test5

  • Rate of change in memory usage as a function of wall-time:

test6

Inputting up to 7 data sets is supported, although the legend does increase significantly in size and the data sets are more difficult to distinguish on the graph: it may be preferable to graph two sets of data at a time.

-Memory as a function of wall-time using 3 data sets:

test10

Issues

Plotting a stacked graph using multiple data sets is not supported (and will print an error) due to its lesser readability, although plotting a stacked graph using one set of data (stacking multiple variables) is still supported.

Committed by RAL Work Experience students Ismail Ryabchuk and Will Haywood under the supervision of Stewart Martin-Haugh (@StewMH).

@Cossack42 Cossack42 marked this pull request as ready for review July 27, 2023 09:20
Copy link
Collaborator

@amete amete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Cossack42,

Thank you very much for your contribution. This is certainly a good functionality to have and the sample plots you attached look great. I have a few minor comments. Afterwards, this PR should be good to go.

Best,
Serhan

package/index.html Outdated Show resolved Hide resolved
package/scripts/prmon_plot.py Outdated Show resolved Hide resolved
package/scripts/prmon_plot.py Outdated Show resolved Hide resolved
Ismail Ryabchuk N/A and others added 2 commits July 28, 2023 16:33
It was a random file I used to test the functionality of the terminal in creating files so it is not necessary.
Copy link
Member

@graeme-a-stewart graeme-a-stewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this @Cossack42, it's a nice feature to have. There's one small formatting bug to fix, then it's good to go from my side.

package/scripts/prmon_plot.py Outdated Show resolved Hide resolved
@amete
Copy link
Collaborator

amete commented Aug 1, 2023

Thanks a lot @Cossack42, @graeme-a-stewart. All looks good now.

@amete amete merged commit 7481a4d into HSF:main Aug 1, 2023
5 checks passed
@Cossack42
Copy link
Contributor Author

No thank you! I enjoyed working on this.

@graeme-a-stewart
Copy link
Member

Let me add again my thanks @Cossack42. These are great contributions to receive. 🙏

@Cossack42
Copy link
Contributor Author

Anytime!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants