Code Monkey home page Code Monkey logo

Comments (9)

amete avatar amete commented on June 15, 2024

I just pushed a new branch named master-improve-plotting-script where I tried to address this issue. I tried to beautify the axis/legend labels, properly assign the units etc. This also addresses the plotting issues mentioned in #64.

Some examples are:

./prmon_plot.py --xvar wtime --yvar vmem,pss,rss --stacked
prmon_wtime_vs_vmem_pss_rss

./prmon_plot.py --xvar wtime --yvar utime,stime,wtime
prmon_wtime_vs_utime_stime_wtime

./prmon_plot.py --xvar wtime --yvar utime,stime --diff
prmon_wtime_vs_diff_utime_stime

./prmon_plot.py --xvar wtime --yvar rx_bytes,tx_bytes --diff
prmon_wtime_vs_diff_rx_bytes_tx_bytes

Could you give it a shot and let me know? Let me tag @graeme-a-stewart in case he also wants to comment.

Many thanks.

-s

from prmon.

graeme-a-stewart avatar graeme-a-stewart commented on June 15, 2024

@amete - thanks! My suggestion is that one can somehow scale the y-axis into a fixed unit size, e.g., GB or kB/s. When I see memory in "kB * 1e8" I have to do quite some mental gymnastics to realise that 0.2 = 20GB.

BTW, I like a lot plotting the time in relative seconds instead of the actual GMT clock time - much more useful.

from prmon.

amete avatar amete commented on June 15, 2024

Thanks @graeme-a-stewart. I guess we can easily pass a multiplier (for both x and y axes) or allow the user to choose from a list of possible options (kb, mb, gb etc.). Prior gives more freedom but makes it a bit cumbersome to decide what units we should write to the label while the latter is more restrictive but eases the second issue. I believe the mainline usage would be just to convert either memory/data-transfer or time from the default units to more meaningful ones (i.e. kb2gb and sec2min). So, perhaps the second option would suffice?

from prmon.

amete avatar amete commented on June 15, 2024

I just implemented and push the updated script that allows the user to change the units of the x/y-axes. The usage is like:

./prmon_plot.py --xunit MIN --yunit GB:
prmon_wtime_vs_pss

./prmon_plot.py --xunit MIN --yunit GB --diff:
prmon_wtime_vs_diff_pss

I can add a further protection that checks the consistency between the variable and the unit, i.e. throw an error if one tries --xvar pss --xunit SEC etc. but I'm not super sure if this is really necessary, maybe I'm being over cautious?

-s

from prmon.

sciaba avatar sciaba commented on June 15, 2024

I am in favour of letting the user to choose the unit (any default is fine if the user can override it).
I was wondering if we can just get rid of " obtained from PrMon output", it makes the title unnecessarily long.

from prmon.

amete avatar amete commented on June 15, 2024

Sure, I can strip that part to make the title short. Do we want to mention PrMon in some part of the plot?

from prmon.

sciaba avatar sciaba commented on June 15, 2024

I don't see the need, personally.

from prmon.

amete avatar amete commented on June 15, 2024

Cool, I just pushed the changes w/ the shortened title.

from prmon.

graeme-a-stewart avatar graeme-a-stewart commented on June 15, 2024

Fixed with #66

from prmon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.