Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Richard2014-02-25 03:15:47 -0500
committerAxel Richard2014-02-26 03:21:44 -0500
commit99750a63a27ba155c02b0aa5b784a794d80b4b09 (patch)
tree7f29a9fc8fdb39cb3ce8603af55e0454fdd31aff /performance
parentef4e76b56a918a692619c2f94bf9fc800d18a409 (diff)
downloadorg.eclipse.emf.compare-99750a63a27ba155c02b0aa5b784a794d80b4b09.tar.gz
org.eclipse.emf.compare-99750a63a27ba155c02b0aa5b784a794d80b4b09.tar.xz
org.eclipse.emf.compare-99750a63a27ba155c02b0aa5b784a794d80b4b09.zip
Add LogicalModelTest to the Suite
Diffstat (limited to 'performance')
-rw-r--r--performance/org.eclipse.emf.compare.tests.performance/src/data/models/model_size_large/.project11
-rw-r--r--performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/PerformanceSuite.java4
-rw-r--r--performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/TestLogicalModel.java37
3 files changed, 49 insertions, 3 deletions
diff --git a/performance/org.eclipse.emf.compare.tests.performance/src/data/models/model_size_large/.project b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/model_size_large/.project
new file mode 100644
index 000000000..f2743b6ab
--- /dev/null
+++ b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/model_size_large/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>model_size_large</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/PerformanceSuite.java b/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/PerformanceSuite.java
index fe95d4fe7..edf9964be 100644
--- a/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/PerformanceSuite.java
+++ b/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/PerformanceSuite.java
@@ -22,8 +22,8 @@ import org.junit.runners.Suite.SuiteClasses;
TestConflict.class,
TestCompare.class,
TestPostMatchUML.class,
- TestPostComparisonUML.class
- //TestLogicalModel.class
+ TestPostComparisonUML.class,
+ TestLogicalModel.class,
})
public class PerformanceSuite {
diff --git a/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/TestLogicalModel.java b/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/TestLogicalModel.java
index 5b7910115..02f7edf3e 100644
--- a/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/TestLogicalModel.java
+++ b/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/TestLogicalModel.java
@@ -74,6 +74,8 @@ public class TestLogicalModel extends AbstractEMFComparePerformanceTest {
}
});
data.dispose();
+ project.close(new NullProgressMonitor());
+ project.delete(false, new NullProgressMonitor());
} catch (Exception e) {
e.printStackTrace();
Assert.fail();
@@ -90,11 +92,41 @@ public class TestLogicalModel extends AbstractEMFComparePerformanceTest {
URL entry = bundle.getEntry("src/data/models/model_size_nominal/.project");
URL fileURL = FileLocator.toFileURL(entry);
IProjectDescription description = ResourcesPlugin.getWorkspace().loadProjectDescription(new Path(fileURL.getPath()));
-
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(description.getName());
project.create(description, new NullProgressMonitor());
project.open(new NullProgressMonitor());
+ final IFile leftFile = project.getFile(new Path("original/model.uml"));
+ final IFile rightFile = project.getFile(new Path("modified/model.uml"));
+ final ITypedElement leftTypedElement = new StorageTypedElement(leftFile, leftFile.getFullPath().toOSString());
+ final ITypedElement rightTypedElement = new StorageTypedElement(rightFile, rightFile.getFullPath().toOSString());
+ monitor.measure(false, getStepsNumber(), new Runnable() {
+ public void run() {
+ data.logicalModel(leftTypedElement, rightTypedElement);
+ }
+ });
+ data.dispose();
+ project.close(new NullProgressMonitor());
+ project.delete(false, new NullProgressMonitor());
+ } catch (Exception e) {
+ e.printStackTrace();
+ Assert.fail();
+ }
+ }
+
+ //@Test
+ public void c_logicalModelUMLLarge() {
+ try {
+ PerformanceMonitor monitor = getPerformance().createMonitor("logicalModelUMLLarge");
+ final Data data = new SmallInputData();
+
+ Bundle bundle = Platform.getBundle("org.eclipse.emf.compare.tests.performance");
+ URL entry = bundle.getEntry("src/data/models/model_size_large/.project");
+ URL fileURL = FileLocator.toFileURL(entry);
+ IProjectDescription description = ResourcesPlugin.getWorkspace().loadProjectDescription(new Path(fileURL.getPath()));
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(description.getName());
+ project.create(description, new NullProgressMonitor());
+ project.open(new NullProgressMonitor());
final IFile leftFile = project.getFile(new Path("original/model.uml"));
final IFile rightFile = project.getFile(new Path("modified/model.uml"));
final ITypedElement leftTypedElement = new StorageTypedElement(leftFile, leftFile.getFullPath().toOSString());
@@ -106,9 +138,12 @@ public class TestLogicalModel extends AbstractEMFComparePerformanceTest {
}
});
data.dispose();
+ project.close(new NullProgressMonitor());
+ project.delete(false, new NullProgressMonitor());
} catch (Exception e) {
e.printStackTrace();
Assert.fail();
}
}
+
}

Back to the top