Closed Bug 908020 Opened 12 years ago Closed 12 years ago

tests 160 and 161 _appInUse take too long (top 8 duration)

Categories

(Toolkit :: Application Update, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: mihneadb, Assigned: robert.strong.bugs)

Details

Attachments

(1 file, 1 obsolete file)

This test takes too long and it affects performance when running xpcshell tests in parallel. It should be made faster or split across multiple files. You can see the duration data here[1]. It was collected on a linux x64 laptop. [1] http://www.mihneadb.net/xpcshelltest-resource-usage/
test_0160_appInUse_complete.js = 12796.579122543335 test_0161_appInUse_xp_unix_complete.js = 12353.29008102417 This is likely due to the helper app and that we have to use timeouts to make sure that the helper app has launched. I've submitted a patch to try that should lessen the time for the test to run though I suspect it will need additional tuning. https://tbpl.mozilla.org/?tree=Try&rev=15a978335468
Rob: Thank you for promptly looking at these tests!
Attached patch 1. improve timeout usage rev1 (obsolete) — Splinter Review
try looks good so far. The patch that increased the timeout was for an intermittent orange that I followed up with a real fix so reducing it should be fine. I think the rest of the changes should be fine as well.
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attached patch patch rev1Splinter Review
For test_0160_appInUse_complete.js I printed out times for completion from loading the head file, for most of the functions and then intentionally threw at the end of the test. I only tested this on Windows and Linux since the other try run looked good and there are minimal changes between this and the last patch. test_0160_appInUse_complete.js made it to the end where it threw so it looks like the additional changes are fine. https://tbpl.mozilla.org/?tree=Try&rev=651cf56c2933 On Linux the xpcshell timestamp started at 02:42:26 and ended at 02:42:28 and the times I printed out added up to 1240 ms.
Attachment #793862 - Attachment is obsolete: true
Attachment #793944 - Flags: review?(netzen)
Attachment #793944 - Flags: review?(netzen) → review+
Pushed to fx-team https://hg.mozilla.org/integration/fx-team/rev/30d13245ff58 Adding leave open keyword since there is a decent chance that the tests will still be slow though hopefully it will be closer to other update tests with these changes. Mihnea, could you provide duration time with this patch applied?
Flags: needinfo?(mihneadb)
Whiteboard: [leave open]
They still took ~12-13 seconds, which is what they took previously. I don't think the tests are hitting that timeout, at least on my laptop. :(
Flags: needinfo?(mihneadb)
These tests definitely use that timeout though not that often. I haven't been keeping track of the parallel xpcshell landing... has it landed yet? When you run the test by itself how long does it take? From <objdir>/toolkit/mozapps/update/ make SOLO_FILE=test_0160_appInUse_complete.js -C test check-one
Mihnea, can I get you to provide the info in comment #8? Thanks
Flags: needinfo?(mihneadb)
(In reply to Robert Strong [:rstrong] (do not email) from comment #10) > Mihnea, can I get you to provide the info in comment #8? Thanks Sorry I missed it! make SOLO_FILE=test_0160_appInUse_complete.js -C test check-one 0.42s user 0.18s system 4% cpu 13.242 total So it still takes a while. Parallel xpcshell has landed but it is turned off in automation for now (ironing out some wrinkles with intermittent failures). If you use mach xpcshell-test locally, it will run tests in parallel by default (because those mentioned failures only happen on the test slaves).
Flags: needinfo?(mihneadb)
For the record, the situation is different on linux [1]. These tests are not a problem there. [1] http://www.mihneadb.net/xpcshelltest-resource-usage/
So, the numbers went from test_0160_appInUse_complete.js = 12796.579122543335 to 1427.4768829345703 test_0161_appInUse_xp_unix_complete.js = 12353.29008102417 to 1441.99800491333 Mihnea, any idea what accounts for the change?
Flags: needinfo?(mihneadb)
I'd say linux vs os x. Also, I ran the latest batch in parallel. I'll do some more benchmarks later, I'm a bit busy on something else right now.
Flags: needinfo?(mihneadb)
Both datasets are from Linux per comment #0 and comment #12
I did some more testing. I can confirm on OS X as well that at least 160_appInUse (since 161 is skipped) takes less time. Must have been your change. I'd say we can close the bug, I'll reopen if I find the tests take longer than expected. Thanks!
I also confirmed with the data in TBPL logs.
Thanks for the confirmation!
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [leave open]
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: