Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

VIATRA/Query/UserDocumentation/SDK/QueryHotspotTesting

< VIATRA‎ | Query
Revision as of 05:50, 22 March 2016 by Harmath.incquerylabs.com (Talk | contribs) (Update to VIATRA Query 1.2)

If you have a large number of patterns and you find that the incremental query evaluation seems very slow or uses more memory than expected, it is useful to take an instance model where the issue occurs and evaluate the footprint of each pattern independently. Of course, patterns that call other patterns will also incorporate the footprint of those patterns, but the difference can be seen nonetheless.

We provide a simple JUnit test for performing this hotspot evaluation easily using the Testing Framework of VIATRA Query: QueryPerformanceTest.xtend

Read the JavaDoc for more details, while an example on its usage can be found here for our UML surrogate queries: UMLSurrogateQueryPerformanceTest.java

Note that if you run the test and use the YourKit profiler (thanks for supporting us again!), the problematic patterns can be easily identified by looking at the heap size graphs, selecting the exceeding parts and looking at the current trace to see which query is being built.

Back to the top