Bug 176825 - FullSourceWorkspaceCompletionTests doesn't run correctly
Summary: FullSourceWorkspaceCompletionTests doesn't run correctly
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2007-03-09 09:52 EST by David Audel CLA
Modified: 2007-03-20 09:55 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (3.97 KB, patch)
2007-03-15 07:25 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Audel CLA 2007-03-09 09:52:19 EST
An IndexOutOfBoundsException is thrown at the first accepted completion proposal and is caught inside CompletionEngine#complete().

The exception come from:

public class FullSourceWorkspaceCompletionTests {
  ...
  class TestCompletionRequestor extends CompletionRequestor {
    public void accept(CompletionProposal proposal) {
      PROPOSAL_COUNTS[TESTS_LENGTH-TESTS_COUNT]++;
    }
  }
  ...
}

The problem is that TESTS_LENGTH is never initialized.

This problem was introduced in revision 1.4 o FullSourceWorkspaceCompletionTests (11/22/05). 
So these performance tests aren't accurate since this date.
Comment 1 Frederic Fusier CLA 2007-03-15 07:25:06 EDT
Created attachment 60916 [details]
Proposed patch

Here are the results now correctly printed with this patch:

-------------------------------------
Completion performance test statistics:
  - 400 completions have been performed
  - following proposals have been done:
  	+ test 0: 29,110 proposals
  	+ test 1: 67,240 proposals
  	+ test 2: 304,630 proposals
  	+ test 3: 72,980 proposals
  	+ test 4: 333,330 proposals
  	+ test 5: 72,570 proposals
  	+ test 6: 2,460 proposals
  	+ test 7: 19,680 proposals
  	+ test 8: 333,330 proposals
-------------------------------------

Note that all tests have been renamed as time is completely different without this fix.

Here are numbers got while running these tests with the fix on our local performance Linux test box:

	test0	test1	test2	test3	test4	test5	test6	test7	test8
-----------------------------------------------------------------------------
R3_2	13741	9798	23686	9685	24465	9645	9006	6999	21828
M5	13489	9446	23215	9346	23599	9264	22353	6705	21187
HEAD	13447	9437	21416	9935	22463	9805	9139	7287	20005
=============================================================================

Difference using R3_2 as reference:

	test0	test1	test2	test3	test4	test5	test6	test7	test8
-----------------------------------------------------------------------------
M5	1,83%	3,59%	1,99%	3,50%	3,54%	3,95%	-148,2%	4,20%	2,94%
HEAD	2,13%	3,68%	9,58%	-2,59%	8,19%	-1,66%	-1,48%	-4,12%	8,35%
=============================================================================

Problem on test5 (M5) is due to bug 176971 which is fixed in HEAD stream.
Perfs regression on test3, 5, 6 & 7 is due functionality addition while fixing bug 162865...
Comment 2 Frederic Fusier CLA 2007-03-15 07:48:06 EDT
You should read "Problem on test6 (M5)" in previous comment

Released for 3.3 M6 in HEAD stream.
Released in perf_32x stream to synchronize changes in reference.

Note that for 3.2, statistics are a little bit different:
-------------------------------------
Completion performance test statistics:
  - 400 completions have been performed
  - following proposals have been done:
  	+ test 0: 28,700 proposals
  	+ test 1: 67,240 proposals
  	+ test 2: 304,630 proposals
  	+ test 3: 71,750 proposals
  	+ test 4: 333,330 proposals
  	+ test 5: 71,750 proposals
  	+ test 6: 2,460 proposals
  	+ test 7: 18,450 proposals
  	+ test 8: 333,330 proposals
-------------------------------------
Comment 3 Olivier Thomann CLA 2007-03-20 09:55:05 EDT
Verified for 3.3 M6 using build I20070320-0010