Skip to content

Commit

Permalink
Renamed benchmark plugin again and other minor fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ujhelyiz committed Aug 10, 2017
1 parent fc89834 commit bd3a8b5
Show file tree
Hide file tree
Showing 35 changed files with 56 additions and 58 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pipeline {

post {
always {
archiveArtifacts 'com.incquerylabs.instaschema.performance/results/**, benchmark/**'
archiveArtifacts 'com.incquerylabs.magicdraw.benchmark/results/**, benchmark/**'
}
success {
slackSend channel: "magicdraw-notificatio",
Expand Down
2 changes: 1 addition & 1 deletion MagicDraw with all plugins/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Require-Bundle: org.eclipse.viatra.query.runtime,
org.eclipse.viatra.transformation.runtime.emf,
org.eclipse.xtext.xbase.lib,
eu.mondo.sam.bundle;bundle-version="0.1.0",
com.incquerylabs.instaschema.performance;bundle-version="1.0.0"
com.incquerylabs.magicdraw.benchmark;bundle-version="1.0.0"
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
4 changes: 2 additions & 2 deletions benchmark/convert_results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cd "$( cd "$( dirname "$0" )" && pwd )"
rm -rf ${WORKSPACE}/benchmark/results
mkdir ${WORKSPACE}/benchmark/results

cd ${WORKSPACE}/com.incquerylabs.instaschema.performance/results
cd ${WORKSPACE}/com.incquerylabs.magicdraw.benchmark/results

for i in $(ls -d */); do
echo ${i};
Expand All @@ -15,7 +15,7 @@ for i in $(ls -d */); do
else
echo "PROCESS"
mkdir ${WORKSPACE}/benchmark/results/${i}
python3 ${WORKSPACE}/mondo-sam/reporting/convert_results.py --source ${WORKSPACE}/com.incquerylabs.instaschema.performance/results/${i} \
python3 ${WORKSPACE}/mondo-sam/reporting/convert_results.py --source ${WORKSPACE}/com.incquerylabs.magicdraw.benchmark/results/${i} \
--jsonfile ${WORKSPACE}/benchmark/results/${i}results.json \
--csvfile ${WORKSPACE}/benchmark/results/${i}results.csv
fi
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.incquerylabs.instaschema.performance</name>
<name>com.incquerylabs.magicdraw.benchmark</name>
<comment></comment>
<projects>
</projects>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Validation
Bundle-SymbolicName: com.incquerylabs.instaschema.performance;singleton:=true
Bundle-SymbolicName: com.incquerylabs.magicdraw.benchmark;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Export-Package: com.incquerylabs.instaschema.performance
Export-Package: com.incquerylabs.magicdraw.benchmark
Require-Bundle: org.eclipse.viatra.query.runtime;bundle-version="1.6.0",
org.eclipse.viatra.transformation.runtime.emf;bundle-version="1.6.0",
com.nomagic.magicdraw;bundle-version="17.0.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin
class="com.incquerylabs.instaschema.performance.InstaSchemaPerformancePlugin"
class="com.incquerylabs.magicdraw.benchmark.PerformanceBenchmarkRunner"
class-lookup="GlobalFirst"
id="com.incquerylabs.instaschema.performance"
id="com.incquerylabs.magicdraw.benchmark"
name="VIATRA Query Benchmark Performance"
provider-name="IncQuery Labs ltd."
version="1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


<groupId>com.incquerylabs.magicdraw</groupId>
<artifactId>benchmark.performance</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

Expand Down Expand Up @@ -460,4 +459,5 @@
</dependency>

</dependencies>
<artifactId>com.incquerylabs.instaschema.performance</artifactId>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ do
-Dlogback.configurationFile="$MD_HOME/data/logback.xml" \
-Dmd.plugins.dir="$MD_HOME/plugins${cp_delim}target/plugin-release/files/plugins${cp_delim}../com.incquerylabs.benchmark.performance/target/plugin-release/files/plugins" \
-Dcom.nomagic.magicdraw.launcher=com.nomagic.magicdraw.commandline.CommandLineActionLauncher \
-Dcom.nomagic.magicdraw.commandline.action=com.incquerylabs.instaschema.performance.benchmark.PerformanceBenchmarkRunner \
-Dcom.nomagic.magicdraw.commandline.action=com.incquerylabs.magicdraw.benchmark.PerformanceBenchmarkRunner \
-cp "$CP" \
com.nomagic.osgi.launcher.ProductionFrameworkLauncher "$@ -engine $engine -query $query -index $runIndex -size $size -model '${MD_HOME}/performance/inputs/TMT$size.mdzip' -warmup '${MD_HOME}/performance/inputs/Warmup.mdzip' -output '${OUTPUT_DIR}'"
done
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.performance.benchmark;
package com.incquerylabs.magicdraw.benchmark;

import java.util.Objects;

Expand All @@ -13,12 +13,11 @@
import org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint;
import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery;

import com.incquerylabs.instaschema.performance.EngineImpl;
import com.incquerylabs.instaschema.performance.incrementalqueries.IncrementalQueries;
import com.incquerylabs.instaschema.performance.incrementalqueries.util.ParentStateQuerySpecification;
import com.incquerylabs.instaschema.performance.queries.APerformanceQueries;
import com.incquerylabs.instaschema.performance.queries.util.IncomingTransitionsQuerySpecification;
import com.incquerylabs.instaschema.performance.queries.util.TransitiveSubstatesWithCheck3QuerySpecification;
import com.incquerylabs.magicdraw.benchmark.incrementalqueries.IncrementalQueries;
import com.incquerylabs.magicdraw.benchmark.incrementalqueries.util.ParentStateQuerySpecification;
import com.incquerylabs.magicdraw.benchmark.queries.APerformanceQueries;
import com.incquerylabs.magicdraw.benchmark.queries.util.IncomingTransitionsQuerySpecification;
import com.incquerylabs.magicdraw.benchmark.queries.util.TransitiveSubstatesWithCheck3QuerySpecification;

public enum BackendSelection {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.performance.benchmark;
package com.incquerylabs.magicdraw.benchmark;

import java.io.File;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.incquerylabs.magicdraw.benchmark;

public enum EngineImpl {
RETE, LOCAL_SEARCH
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.performance;
package com.incquerylabs.magicdraw.benchmark;

import java.awt.event.ActionEvent;
import java.io.File;
Expand Down Expand Up @@ -51,11 +51,10 @@
import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;

import com.google.common.base.Stopwatch;
import com.incquerylabs.instaschema.performance.benchmark.PerformanceBenchmarkRunner;
import com.incquerylabs.instaschema.performance.incrementalqueries.IncrementalQueries;
import com.incquerylabs.instaschema.performance.queries.APerformanceQueries;
import com.incquerylabs.instaschema.performance.queries.WarmUpQueries;
import com.incquerylabs.instaschema.performance.queries.util.TransitiveSubstatesWithCheck3QuerySpecification;
import com.incquerylabs.magicdraw.benchmark.incrementalqueries.IncrementalQueries;
import com.incquerylabs.magicdraw.benchmark.queries.APerformanceQueries;
import com.incquerylabs.magicdraw.benchmark.queries.WarmUpQueries;
import com.incquerylabs.magicdraw.benchmark.queries.util.TransitiveSubstatesWithCheck3QuerySpecification;
import com.nomagic.actions.AMConfigurator;
import com.nomagic.actions.ActionsManager;
import com.nomagic.magicdraw.actions.ActionsConfiguratorsManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.performance;
package com.incquerylabs.magicdraw.benchmark;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.incquerylabs.instaschema.performance.benchmark;
package com.incquerylabs.magicdraw.benchmark;

import java.io.File;

import org.eclipse.viatra.query.runtime.api.IQuerySpecification;

import com.incquerylabs.instaschema.mondo.sam.QueryMatcherToken;
import com.incquerylabs.instaschema.mondo.sam.SingleQueryScenario;
import com.incquerylabs.magicdraw.benchmark.mondo.sam.QueryMatcherToken;
import com.incquerylabs.magicdraw.benchmark.mondo.sam.SingleQueryScenario;
import com.nomagic.magicdraw.core.Application;
import com.nomagic.magicdraw.core.project.ProjectDescriptor;
import com.nomagic.magicdraw.core.project.ProjectDescriptorsFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.performance.benchmark;
package com.incquerylabs.magicdraw.benchmark;

import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.incquerylabs.instaschema.performance.incrementalqueries
package com.incquerylabs.magicdraw.benchmark.incrementalqueries

import "http://www.nomagic.com/magicdraw/UML/2.5.0"
import com.incquerylabs.instaschema.performance.queries.statesWithShortNames
import com.incquerylabs.instaschema.performance.queries.incomingTransitions
import com.incquerylabs.instaschema.performance.queries.statesWithMoreIncomingTransitions
import com.incquerylabs.magicdraw.benchmark.queries.statesWithShortNames
import com.incquerylabs.magicdraw.benchmark.queries.incomingTransitions
import com.incquerylabs.magicdraw.benchmark.queries.statesWithMoreIncomingTransitions

/**
* Simple pattern for transitive closures marked incremental.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.mondo.sam
package com.incquerylabs.magicdraw.benchmark.mondo.sam

import eu.mondo.sam.core.DataToken
import eu.mondo.sam.core.phases.AtomicPhase
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.mondo.sam
package com.incquerylabs.magicdraw.benchmark.mondo.sam

import com.google.common.collect.ImmutableSet
import eu.mondo.sam.core.DataToken
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.mondo.sam
package com.incquerylabs.magicdraw.benchmark.mondo.sam

import eu.mondo.sam.core.DataToken
import org.eclipse.emf.ecore.EReference
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.mondo.sam
package com.incquerylabs.magicdraw.benchmark.mondo.sam

import eu.mondo.sam.core.DataToken
import eu.mondo.sam.core.metrics.ScalarMetric
Expand All @@ -17,17 +17,17 @@ class ResultSetRetrievalPhase extends AtomicPhase {
}

override execute(DataToken token, PhaseResult phaseResult) {
val logger = Logger.getLogger("org.eclipse.viatra.query");
val logger = Logger.getLogger("com.incquerylabs.magicdraw.benchmark");
val myToken = token as QueryMatcherToken

// Time and memory are measured
val timer = new TimeMetric("Time")

// val queryBackend = myToken.engine.getQueryBackend(LocalSearchBackendFactory.INSTANCE)
// val profiler = new LocalSearchProfilerAdapter()
// if(queryBackend instanceof LocalSearchBackend){
// queryBackend.addAdapter(profiler)
// }
val queryBackend = myToken.engine.getQueryBackend(LocalSearchBackendFactory.INSTANCE)
val profiler = new LocalSearchProfilerAdapter()
if(queryBackend instanceof LocalSearchBackend){
queryBackend.addAdapter(profiler)
}


timer.startMeasure
Expand All @@ -41,9 +41,9 @@ class ResultSetRetrievalPhase extends AtomicPhase {

phaseResult.addMetrics(timer, matchSetSize)

// if(queryBackend instanceof LocalSearchBackend){
// logger.info(profiler)
// }
if(queryBackend instanceof LocalSearchBackend){
logger.info(profiler)
}
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.incquerylabs.instaschema.mondo.sam
package com.incquerylabs.magicdraw.benchmark.mondo.sam

import com.incquerylabs.instaschema.performance.EngineImpl
import com.incquerylabs.magicdraw.benchmark.EngineImpl
import eu.mondo.sam.core.phases.SequencePhase
import eu.mondo.sam.core.results.CaseDescriptor
import eu.mondo.sam.core.scenarios.BenchmarkScenario
Expand Down Expand Up @@ -51,7 +51,7 @@ class SingleQueryScenario extends BenchmarkScenario {
it.size = this.size
it.runIndex = this.runIndex
it.scenario = this.getName
it.tool = this.getToolName
it.tool = this.toolName
]
return descriptor
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.performance.queries
package com.incquerylabs.magicdraw.benchmark.queries

import "http://www.nomagic.com/magicdraw/UML/2.5.0"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.incquerylabs.instaschema.performance.queries
package com.incquerylabs.magicdraw.benchmark.queries

import "http://www.nomagic.com/magicdraw/UML/2.5.0"

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</properties>

<modules>
<module>com.incquerylabs.instaschema.performance</module>
<module>com.incquerylabs.magicdraw.benchmark</module>

<module>com.incquerylabs.benchmark.generator</module>
</modules>
Expand Down

0 comments on commit bd3a8b5

Please sign in to comment.