Last Comment Bug 744675 - Autodetect a sane -j# for jsreftest runner
: Autodetect a sane -j# for jsreftest runner
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: 16 Branch
: All All
: -- normal (vote)
: mozilla17
Assigned To: Terrence Cole [:terrence]
:
Mentors:
Depends on:
Blocks: 745230
  Show dependency treegraph
 
Reported: 2012-04-11 18:41 PDT by Terrence Cole [:terrence]
Modified: 2012-07-28 18:34 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v0 (3.80 KB, patch)
2012-07-27 17:07 PDT, Terrence Cole [:terrence]
sphink: review+
Details | Diff | Splinter Review

Description Terrence Cole [:terrence] 2012-04-11 18:41:07 PDT
This would be a nice feature to have.
Comment 1 Josh Matthews [:jdm] (away until 9/3) 2012-04-13 10:55:34 PDT
Terrence, could you drop some links to the relevant source files and comment on a suggested method of autodetection?
Comment 2 Terrence Cole [:terrence] 2012-04-13 11:04:57 PDT
(In reply to Josh Matthews [:jdm] from comment #1)
> Terrence, could you drop some links to the relevant source files and comment
> on a suggested method of autodetection?

The jsreftest testsuite code is in js/src/tests/.  The main file that will need modification is jstests.py.

I had couple of specific API's in mind, but it turns out someone has already made a comprehensive list; we should be able to get away with just cribbing from stackoverflow:

http://stackoverflow.com/questions/1006289/how-to-find-out-the-number-of-cpus-in-python
Comment 3 Terrence Cole [:terrence] 2012-04-16 10:32:36 PDT
MXR link for where we add the -j arg:
http://mxr.mozilla.org/mozilla-central/source/js/src/tests/jstests.py#68

It would be easiest to set the default= parameter here to the output of the function in the stack-overflow article.
Comment 4 Terrence Cole [:terrence] 2012-07-27 17:07:03 PDT
Created attachment 646767 [details] [diff] [review]
v0

And updates the core help with output format notes, since I was in the area.
Comment 5 Steve Fink [:sfink] [:s:] 2012-07-27 17:40:42 PDT
Comment on attachment 646767 [details] [diff] [review]
v0

Review of attachment 646767 [details] [diff] [review]:
-----------------------------------------------------------------

I think I'll just take your word for this one. For the default, why go down to 1, though? It seems like if somebody bothers to specify -j, then they'd expect at least 2.
Comment 6 Terrence Cole [:terrence] 2012-07-27 17:54:14 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/088951918af8
Comment 7 Ryan VanderMeulen [:RyanVM] 2012-07-28 18:34:39 PDT
https://hg.mozilla.org/mozilla-central/rev/088951918af8

Note You need to log in before you can comment on or make changes to this bug.