Migrate the JFace performance tests off org.eclipse.test.performance - #4240
Merged
vogella merged 1 commit intoAug 13, 2026
Merged
Conversation
Applies the treatment the editor performance tests already received to the tests under org.eclipse.jface.tests.performance: they drop the performance meter, whose measurements went nowhere because the performance database has not been configured for years, and time the individual operations instead. Every test now asserts that the operation it measures actually did something, so a run can fail rather than silently report nothing, and a manual run prints min, median, 90th percentile and maximum per scenario. The tests are converted to JUnit 5 throughout, which they only partly were: ViewerTest declared JUnit 5 lifecycle callbacks that were never invoked for its JUnit 4 subclasses, so its measurement setup did not run at all. Dropping UIPerformanceTestRule from the tests that never used the workbench also spares them creating and building a 300 file project. Adds TreeViewerExpansionTest, which covers restoring the expansion state of a tree whose elements have a recursive hashCode, the shape of an LSP document symbol. Restoring expansion looks every item up in a table keyed by TreePath, and TreePath hashes all of its segments, so such an element is hashed once per descendant on every lookup. The test reports 361056 recursive hash visits for 1884 elements, about 192 per element, and the same measurement with an IElementComparer that supplies a cheap key reports none. The bundle stays excluded from the default test run.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies the treatment the editor performance tests already received to the tests under
org.eclipse.jface.tests.performance: they drop the performance meter, whose measurements went nowhere because the performance database has not been configured for years, and time the individual operations instead. Every test now asserts that the operation it measures actually did something, so a run can fail rather than silently report nothing, and a manual run prints min, median, 90th percentile and maximum per scenario.The tests are also converted to JUnit 5 throughout, which they only partly were:
ViewerTestdeclared JUnit 5 lifecycle callbacks that were never invoked for its JUnit 4 subclasses, so its measurement setup did not run at all. DroppingUIPerformanceTestRulefrom the tests that never touch the workbench spares them creating and building a 300 file project.New in this change is
TreeViewerExpansionTest, which covers restoring the expansion state of a tree whose elements have a recursivehashCode, the shape of an LSP document symbol. Restoring expansion looks every item up in a table keyed byTreePath, andTreePathhashes all of its segments, so such an element gets hashed once per descendant on every lookup. It reports 361056 recursive hash visits for 1884 elements, roughly 192 per element, while the same measurement with anIElementComparersupplying a cheap key reports none. That is the cost a large outline pays on every refresh, and it was not covered by any existing test.The bundle stays excluded from the default test run, so verification times are unaffected.