could we multithreading build tasks? (eg qunit/jsunit/junit/msunit)
just a random thought... if the build servers have quad-cores or the like and we multi-threaded some of the build processes (eg unit tests), wouldn't that be nice? anyone ever multithread unit tests before? theoretically it should be doable.
Tagged:
2
Answers
-
Yes, I did this with all of the Cobalt *StaticContent builds for a while with the JsUnit and QUnit tests. It worked great locally on a beefy developer box but tended to timeout more frequently on the good-but-not-great CI build boxes. I've referenced some pertinent commits below but the build scripts have changed a lot since then, so its utility will be limited. The big difference was, of course, running multiple "PhantomJS.exe" processes simultaneously by utilizing Ant's `parallel` task. _Interesting Changesets:_ - [#222996](
http://tfsnpt.int.thomson.com:8080/tfs/web/UI/Pages/Scc/
ViewChangeset.aspx?changeset=222996&pguid=60798db5-fb71-4793-a6b6-79e322749a57): Initial introduction of parallelism - [#223672](
http://tfsnpt.int.thomson.com:8080/tfs/web/UI/Pages/Scc/
ViewChangeset.aspx?changeset=223672&pguid=60798db5-fb71-4793-a6b6-79e322749a57): Throttled back the max threads allowed for parallelism - [#224311](
http://tfsnpt.int.thomson.com:8080/tfs/web/UI/Pages/Scc/
ViewChangeset.aspx?changeset=224311&pguid=60798db5-fb71-4793-a6b6-79e322749a57): Removed parallelism In all changesets, seek out the "UnitTestAntScript.xml" and "ant-global.properties" files and compare with their previous versions. ~~~ The Document module team also tried to multithread their MSTest unit tests before but ran into race conditions in their mocking library (RhinoMocks) and so had to revert.2 -
interesting... sure, if you can find the changesets quickly, I'd be interested in looking. Wonder why phantonjs would time out?0
-
In retrospect after much additional learning, we don't believe that PhantomJS timed out at all. Rather, it seems that the old version of Jetty (the dynamic HTTP server that we host the Static Content files with) we were using (a custom-wrapped version of Jetty 6) couldn't keep up with the load/demand without lagging, which led to the max timeouts that we specified being exceeded. We have since upgraded to Jetty 9 but have not yet attempted to recreate the multithreaded test run as we are working to correct some other related issues.0
-
Thanks for that background, James. Do you think switching from good to great servers might help as well? Just wondering since so many people depend on these builds... if we all spoke up from the various communities and demonstrated the potential increases to velocity... if the servers might be candidates for upgrade? Just wondering if there's anything we could do to help out. Thanks for your efforts.0
-
Edited my original answer to add changesets for *StaticContent parallelism and recount what I heard from the Doc team.0
-
One would hope that a concerted urge from the developers to get better build boxes would be well received and acted upon... not positive of the reality. Personally, I expect my build boxes to have equal or _**BETTER**_ specs than my developer box but that's just me.0
-
I'll second that and pass it along (fwiw)0
-
In Research Organizer (Foldering) we run our builds in parallel. More specifically, the unit tests, integration tests, and the endpoint tests are run in a parallel manner (basically, three threads of execution). Doing so reduces our build time from ~20 minutes to closer to 12 minutes (as measured on my machine). Like in James's case, we use Ant's parallel task to accomplish this.2
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛