Skip to content

Added get_cpu_speed to tools.systemtools#694

Merged
boegel merged 7 commits intoeasybuilders:developfrom
wpoely86:cpuspeed
Sep 28, 2013
Merged

Added get_cpu_speed to tools.systemtools#694
boegel merged 7 commits intoeasybuilders:developfrom
wpoely86:cpuspeed

Conversation

@wpoely86
Copy link
Copy Markdown
Member

Returns the maximum cpu speed in MHz.

Returns the maximum cpu speed in MHz.
Comment thread easybuild/tools/systemtools.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

with does not exist in py2.4

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What minimal version of python should I keep in mind? 2.4?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes, 2.4

@wpoely86
Copy link
Copy Markdown
Member Author

In the file systemtools.py there is a constant UNKNOWN but several function return strings like "UNKNOWN_SYSTEM_NAME". Should they not all use the constant?

Comment thread easybuild/tools/systemtools.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use

cpu_freq = f.read()/1000.0

instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, sorry, you're getting a string of course...

@boegel
Copy link
Copy Markdown
Member

boegel commented Sep 28, 2013

Remarks fixed in wpoely86#3, and added unit tests for systemtools.py.

This PR should be considered on hold until the above PR is handled by @wpoely86 .

@wpoely86
Copy link
Copy Markdown
Member Author

Ready for pull.

@boegel
Copy link
Copy Markdown
Member

boegel commented Sep 28, 2013

@wpoely86: You mean, ready for merging. ;-)
Don't worry, it's Saturday night for everybody (CET).

Just checked again, looks OK, so merging it. Thanks!

boegel added a commit that referenced this pull request Sep 28, 2013
Added get_cpu_speed to tools.systemtools
@boegel boegel merged commit c0d53d6 into easybuilders:develop Sep 28, 2013
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