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

Implement suited unique set size (USS) for Linux #28

Closed
wants to merge 10 commits into from
Closed

Implement suited unique set size (USS) for Linux #28

wants to merge 10 commits into from

Conversation

lexover
Copy link

@lexover lexover commented Mar 7, 2018

Implement suited unique set size (USS) for record memory activity which more sutable for Linux systems using argument --linux.

Copy link
Owner

@astrofrog astrofrog left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request!

This is a good idea but I think we can simplify this somewhat - basically you could just check to see if current_mem.uss raises an AttributeError or not - if not, then include it in the results, otherwise we don't. Then there is no need for a --linux flag and for the version checks for psutil. The check for current_mem.uss could be done in the first loop and could set a has_uss flag that could then be used in subsequent iterations.

Let me know if you don't have time to work on this, and I can push some commits to this pull request to show what I mean.

@lexover
Copy link
Author

lexover commented Jun 16, 2018

Thanks for the review!

The USS (Unique Set Size) works for Linux, OSX, and Windows platforms. If method memory_full_info () from psutil will be implemented for OSX or Windows the results of memory usage for this OS will be changed from RSS to USS without any warning. I think it is not good. At the moment in the code of psutil for Linux OS implemented and documented the memory_full_info(), and for Windows and OSX implemented but not documented memory_addrspace_info() methods which calculates USS. Perhaps it makes sense to implement for Linux use USS by default (--linux flag will be removed) or using the --uss param and later implement these function as the option for all appropriate OS if it is necessary (Unfortunatly I cant test this methods on OSX and Windows. I can implements this, but it's needs to be tested on real OS).

Removed --linux flag, now if psrecord running on Linux system it
automaticly show USS (unique set size) in log file and on the plot.
@lexover lexover closed this Jun 17, 2018
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.

None yet

2 participants