Bug 116284 - [RCP] Performance Tests Failing: RCP rcp.performance.EmptyWorkbenchPerfTest#testRestore() [close]
Summary: [RCP] Performance Tests Failing: RCP rcp.performance.EmptyWorkbenchPerfTest#t...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 RC1   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance, test
: 116282 116283 (view as bug list)
Depends on:
Blocks: 270824
  Show dependency tree
 
Reported: 2005-11-14 12:48 EST by Michael Van Meekeren CLA
Modified: 2009-06-03 12:58 EDT (History)
4 users (show)

See Also:
bokowski: review+


Attachments
Patch (26.19 KB, patch)
2009-04-20 16:45 EDT, Oleg Besedin CLA
no flags Details | Diff
Updated patch (26.12 KB, patch)
2009-05-05 11:45 EDT, Oleg Besedin CLA
emoffatt: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Van Meekeren CLA 2005-11-14 12:48:04 EST
3.2 M3

rcp.performance.EmptyWorkbenchPerfTest#testRestore() [close]

This test is running too fast and failing on most test machines
Comment 1 Tod Creasey CLA 2006-02-22 14:42:31 EST
testRestoreOpen fails as well. The failures begin on build 20051123

Here are the 20051116b numbers 

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [open]' (average over 10 samples):
  Used Java Heap: 218.58K
  Working Set: 643.6K
  Committed: 780.8K
  Working Set Peak: 568.8K
  Elapsed Process: 311 ms
  Kernel time: 106 ms
  Page Faults: 172
  CPU Time: 306 ms
  GDI Objects: 68

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [close]' (average over 10 samples):
  Used Java Heap: 118.17K
  Working Set: -65536
  Committed: -83148
  Working Set Peak: 17.6K
  Elapsed Process: 28 ms
  Kernel time: 10 ms
  Page Faults: 5
  CPU Time: 31 ms
  GDI Objects: -67


And here are the M4 numbers

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [open]' (average over 10 samples):
  Used Java Heap: 1.03M
  Working Set: 1.24M
  Committed: 874.4K
  Working Set Peak: 1.17M
  Elapsed Process: 526 ms
  Kernel time: 115 ms
  Page Faults: 335
  CPU Time: 501 ms
  GDI Objects: 72

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [close]' (average over 10 samples):
  Used Java Heap: 121.27K
  Working Set: -61030
  Committed: -39731
  Working Set Peak: 18.4K
  Elapsed Process: 46 ms
  Kernel time: 12 ms
  Page Faults: 6
  CPU Time: 35 ms
  GDI Objects: -72

Comment 2 Tod Creasey CLA 2006-02-22 14:51:37 EST
And here is the 20051122 numbers.  The issue is apparently between 1116 and 1122

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [open]' (average over 10 samples):
  Used Java Heap: 677.59K
  Working Set: 1.15M
  Committed: 945.2K
  Working Set Peak: 1.07M
  Elapsed Process: 544 ms
  Kernel time: 95 ms
  Page Faults: 318
  CPU Time: 534 ms
  GDI Objects: 67

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [close]' (average over 10 samples):
  Used Java Heap: 213.84K
  Working Set: -62259
  Committed: -22528
  Working Set Peak: 14K
  Elapsed Process: 59 ms
  Kernel time: 9 ms
  Page Faults: 9
  CPU Time: 40 ms
  GDI Objects: -67

Comment 3 Tod Creasey CLA 2006-02-22 16:34:36 EST
If you replace 20051129 with the workbench from 20051122 you get these numbers

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [open]' (average over 10 samples):
  Used Java Heap: 601.04K
  Working Set: 989.2K
  Committed: 1,000.4K
  Working Set Peak: 905.2K
  Elapsed Process: 385 ms
  Kernel time: 78 ms
  Page Faults: 262
  CPU Time: 393 ms
  GDI Objects: 70

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [close]' (average over 10 samples):
  Used Java Heap: 162.43K
  Working Set: -74137
  Committed: -166297
  Working Set Peak: 4.8K
  Elapsed Process: 29 ms
  Kernel time: 7 ms
  Page Faults: 3
  CPU Time: 28 ms
  GDI Objects: -69

Comment 4 Tod Creasey CLA 2006-02-22 16:46:25 EST
If you replace the 1122 builds workbench, jface and core commands you get the following

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [open]' (average over 10 samples):
  Used Java Heap: 330.45K
  Working Set: 633.2K
  Committed: 690K
  Working Set Peak: 545.6K
  Elapsed Process: 278 ms
  Kernel time: 85 ms
  Page Faults: 171
  CPU Time: 278 ms
  GDI Objects: 70

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [close]' (average over 10 samples):
  Used Java Heap: -105416
  Working Set: -49152
  Committed: -142950
  Working Set Peak: 19.6K
  Elapsed Process: 31 ms
  Kernel time: 4 ms
  Page Faults: 9
  CPU Time: 28 ms
  GDI Objects: -69

Comment 5 Tod Creasey CLA 2006-02-22 16:56:18 EST
Bringing in the layout code gives the following (30% performance degradation)

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [open]' (average over 10 samples):
  Used Java Heap: 331.91K
  Working Set: 641.2K
  Committed: 561.2K
  Working Set Peak: 554K
  Elapsed Process: 364 ms
  Kernel time: 107 ms
  Page Faults: 173
  CPU Time: 320 ms
  GDI Objects: 70

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest#testRestore() [close]' (average over 10 samples):
  Used Java Heap: -104212
  Working Set: -48742
  Committed: 78.8K
  Working Set Peak: 19.2K
  Elapsed Process: 28 ms
  Kernel time: 7 ms
  Page Faults: 9
  CPU Time: 23 ms
  GDI Objects: -69

When you bring in keys, the workbench, actions, menus, commands, handlers and services you get about the same result.

I am going to move this to Eric as I think the TrimLayout performance is worth looking at but I suspect the IDE has some of the issues too.
Comment 6 Karice McIntyre CLA 2006-02-23 13:17:31 EST
I think a bunch of the OpenClose Window, Workbench, and Perspective tests are affected by this as well.  See bug 116238 for more details.
Comment 7 Karice McIntyre CLA 2006-02-23 16:04:30 EST
Also note these tests are running in less than 100ms on 4 of 5 machines for the M5 performance results.  
Comment 8 Eric Moffatt CLA 2006-02-27 16:32:15 EST
Tod, I'll look into this as part of the cleanup work on the trim to determine how much has been intro'd by the new creation/layout code.
Comment 9 Tod Creasey CLA 2006-04-18 09:24:30 EDT
The performance on this test is getting steadily worse with the same spike at 20060407 we had before.
Comment 10 Karice McIntyre CLA 2006-07-13 12:03:42 EDT
This is still a problem in the performance test results for 3.2
Comment 11 Tod Creasey CLA 2007-04-25 09:12:14 EDT
And in 3.3

http://fullmoon.torolab.ibm.com/downloads/drops/I20070424-0930/performance/eclipseperflnx1_R3.3/org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest.testOpen()%20%5Bclose%5D.html

They also run too fast - we want to make the test meaningful first and then we should see what the results are like
Comment 12 Tod Creasey CLA 2007-04-25 09:12:32 EDT
*** Bug 116282 has been marked as a duplicate of this bug. ***
Comment 13 Tod Creasey CLA 2007-04-25 09:12:47 EDT
*** Bug 116283 has been marked as a duplicate of this bug. ***
Comment 14 Tod Creasey CLA 2007-04-25 16:17:11 EDT
There is an apparent slowdown in shutdown but it is a degradation from 45ms to 70 ms so I don't think it is something we need to worry about.

I would add a degradation comment but it will require us to rework the test. That will cost us all of our history in 3.3 so I think we should do that early 3.4.
Comment 15 Eric Moffatt CLA 2007-09-11 11:21:47 EDT
Tod, it's early in 3.4 now...;-). Is there anything I should be looking at?
Comment 16 Tod Creasey CLA 2007-09-11 12:56:53 EDT
org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest.testOpen() is where you should look
Comment 17 Oleg Besedin CLA 2009-04-20 16:45:51 EDT
Created attachment 132499 [details]
Patch

The test appears as green / yellow in 3.5 vs 3.4. However, the shutdown times measured by the test on all test machines are < 50ms. To make some sense from the results, they have to be at least 100ms, see:

http://wiki.eclipse.org/Performance_Test_Fingerprint_Guidelines

The patch modifies the test to only record the startup times that are on the order of about 300ms - 500ms. The shutdown times are verified to only be < 120ms. 

Should shutdown times exceed 120ms test will assert and it will be time to check it.

The patch also removes some unused code.
Comment 18 Eric Moffatt CLA 2009-04-23 09:53:28 EDT
Oleg, I've looked at the patch and it looks fine (now that you've explained how the testing works...;-).

The only nit is that you have used the word 'inherit' rather than 'inherent' in the comment about the close times.

Note that we will have to apply the same patch into the 3.4 'performance' branch at the same time we commit it here to maintain parity between the two tests. Do we have to do anything special to regenerate the baseline 3.4 once we've done this?

Boris, what did we decide on for bumping the version?

Since this is test work it's not under the same constraints as the released code so I'm going to re-target this to RC1 to allow for more time for work on the release code.

Right now (for as yet undetermined reasons) I can't seem to get the tests to run. one set consistently gives 'out of handles' and the other (the revamped ones) fail because 'workbench already exists'. Oleg found a suspicious singleton somewhere (Oleg?). This is one main reason I'm deferring this until RC1.

Comment 19 Oleg Besedin CLA 2009-05-04 14:23:35 EDT
(In reply to comment #18)
> Right now (for as yet undetermined reasons) I can't seem to get the tests to
> run. one set consistently gives 'out of handles' and the other (the revamped
> ones) fail because 'workbench already exists'.

The "IllegalStateException: Workbench already exists" is caused by runing the test in UI mode while it is expected to run in a healdess mode.

(The RCPPerformanceTestSuite is described in the "core-test" Ant target which makes testing framework run those tests in the headless mode.)

I can't duplicate the running out of handles error; could you try it again on a recent clean build?
Comment 20 Eric Moffatt CLA 2009-05-05 10:37:33 EDT
Boris, the patch as is won't apply due to changes in the OpenWorkbenchIntervalMonitor & RestoreWorkbenchIntervalMonitor. I've tried it by removing the two imports you added and applying, then fixing the import error (I didn't get one from the OWIM?). Could you review this just to ensure that both fixes work together nicely?
Comment 21 Oleg Besedin CLA 2009-05-05 11:45:35 EDT
Created attachment 134453 [details]
Updated patch

The RCPTestWorkbenchAdvisor was moved into a different place which caused changes in "import" statements. Attaching updated patch (+ fixed the typo in the comment).
Comment 22 Eric Moffatt CLA 2009-05-08 09:53:17 EDT
Committed in >20090508. Applied Oleg's last patch to the 3.5 stream.

Committed in >20090508 (3.4 stream):

- Branched org.eclipse.ui.tests.rcp and applied Oleg's original patch (since the refactoring done in 3.5 wasn't there).
- Ran the releng tool to tag the changes with "M20090508-perf34x".

I'll post the change to releng-dev to re-spin the baseline.
Comment 23 Eric Moffatt CLA 2009-05-08 09:56:57 EDT
Here's the results I get on an 'ad hoc' test...the real 'test machine' results may vary...;-).


Scenario 'org.eclipse.ui.tests.rcp.performance.PlatformUIPerfTest
 #testCreateAndDisposeDisplayX100()' (average over 10 samples):
3,4  Elapsed Process:          56ms        (95% in [32ms, 80ms])
3.5  Elapsed Process:          54ms        (95% in [20ms, 89ms])

Scenario 'org.eclipse.ui.tests.rcp.performance.PlatformUIPerfTest
 #testRunAndShutdownWorkbench()' (average over 10 samples):
3.4  Elapsed Process:         323ms        (95% in [100ms, 546ms])
3.5  Elapsed Process:         407ms        (95% in [89ms, 725ms])

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest
 #testOpen() [open]' (average over 25 samples):
3.4  Elapsed Process:         178ms        (95% in [167ms, 190ms])
3.5  Elapsed Process:         213ms        (95% in [201ms, 225ms])

Scenario 'org.eclipse.ui.tests.rcp.performance.EmptyWorkbenchPerfTest
 #testRestore() [open]' (average over 25 samples):
3.4  Elapsed Process:         214ms        (95% in [200ms, 228ms])
3.5  Elapsed Process:         234ms        (95% in [219ms, 249ms])

Comment 24 Frederic Fusier CLA 2009-05-13 09:17:29 EDT
Verified for 3.5RC1 using I20090512-2000 results
Comment 25 Eric Moffatt CLA 2009-05-13 11:47:20 EDT
Thanks Frederic...