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

ENH add ncores field to asv-machine #761

Merged
merged 3 commits into from
Oct 25, 2018

Conversation

pierreglaser
Copy link
Contributor

Simple PR to add the number of CPUs into .asv-machine.json

asv/machine.py Outdated
@@ -144,6 +149,7 @@ def get_defaults():
return {
'machine': node,
'os': "{0} {1}".format(system, release),
'ncores': os.cpu_count(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should work on Python 2 still.
Also, should be six.text_type, not int.

asv/machine.py Outdated
@@ -119,6 +119,11 @@ class Machine(object):
including its speed and class. For example, 'Intel(R)
Core(TM) i5-2520M CPU @ 2.50GHz (4 cores)'."""),

("ncores",
Copy link
Collaborator

@pv pv Oct 24, 2018

Choose a reason for hiding this comment

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

num_cpu? Not going to bikeshed though if there's good reason to not call it that.

Copy link
Contributor Author

@pierreglaser pierreglaser Oct 25, 2018

Choose a reason for hiding this comment

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

Actually I like more num_cpu, but it felt weird to use underscores in command line options.

@pv pv merged commit 4d7c2c8 into airspeed-velocity:master Oct 25, 2018
@pv
Copy link
Collaborator

pv commented Oct 25, 2018

thanks, merged (CI build failures due to conda flaking out again)

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.

2 participants