Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorckrause2013-12-01 09:06:01 +0000
committerckrause2013-12-01 09:06:01 +0000
commit73adac7065d55c0fc4dbb6417c61178bdeedb60b (patch)
tree53787f70613a763eb44e83404128cd92a09aab05 /tags/0.9.10/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/diningphils/DiningPhilsBenchmark.sh
parentd1b66e28abb65ca8e6fa8a69ae11ebb855fe4811 (diff)
downloadorg.eclipse.emft.henshin-73adac7065d55c0fc4dbb6417c61178bdeedb60b.tar.gz
org.eclipse.emft.henshin-73adac7065d55c0fc4dbb6417c61178bdeedb60b.tar.xz
org.eclipse.emft.henshin-73adac7065d55c0fc4dbb6417c61178bdeedb60b.zip
release 0.9.10
Diffstat (limited to 'tags/0.9.10/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/diningphils/DiningPhilsBenchmark.sh')
-rwxr-xr-xtags/0.9.10/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/diningphils/DiningPhilsBenchmark.sh69
1 files changed, 69 insertions, 0 deletions
diff --git a/tags/0.9.10/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/diningphils/DiningPhilsBenchmark.sh b/tags/0.9.10/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/diningphils/DiningPhilsBenchmark.sh
new file mode 100755
index 000000000..92dd4bbe2
--- /dev/null
+++ b/tags/0.9.10/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/diningphils/DiningPhilsBenchmark.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# ECLIPSE_HOME:
+if [ -d "$HOME/eclipse" ]; then
+ ECLIPSE_HOME="$HOME/eclipse"
+elif [ -d "$HOME/opt/eclipse" ]; then
+ ECLIPSE_HOME="$HOME/opt/eclipse"
+elif [ -d "/usr/local/eclipse" ]; then
+ ECLIPSE_HOME="/usr/local/eclipse"
+else
+ ECLIPSE_HOME="/opt/eclipse"
+fi
+
+# WORKSPACE:
+WORKSPACE=`cd ../../../../../../../..; pwd`
+
+# MAX_MEMORY:
+TOTAL_MEM=`free | grep Mem | awk '{print $2}'`
+TOTAL_MEM=$(($TOTAL_MEM / 1024))
+if [ "$TOTAL_MEM" -gt "2048" ]; then
+ MAX_MEMORY="$(($TOTAL_MEM - 768))M"
+else
+ MAX_MEMORY="$(($TOTAL_MEM - 384))M"
+fi
+
+echo "ECLIPSE_HOME : $ECLIPSE_HOME"
+echo "WORKSPACE : $WORKSPACE"
+echo "MAX_MEMORY : $MAX_MEMORY"
+
+DEPS="org.eclipse.core.contenttype
+org.eclipse.core.jobs
+org.eclipse.core.resources
+org.eclipse.core.runtime
+org.eclipse.osgi
+org.eclipse.equinox.common
+org.eclipse.equinox.registry
+org.eclipse.equinox.preferences
+org.eclipse.equinox.app
+org.eclipse.emf.ecore
+org.eclipse.emf.common
+org.eclipse.emf.ecore.xmi
+org.eclipse.emf.codegen.ecore
+org.eclipse.emf.codegen
+org.eclipse.emf.ecore.change
+org.eclipse.ocl
+lpg.runtime.java
+org.eclipse.ocl.ecore"
+
+HENSHIN="org.eclipse.emf.henshin.model
+org.eclipse.emf.henshin.examples
+org.eclipse.emf.henshin.interpreter
+org.eclipse.emf.henshin.statespace"
+
+# Classpath:
+CP=""
+for dep in $DEPS; do
+ NEXT=`ls $ECLIPSE_HOME/plugins/$dep*.jar | head -1`
+ CP="$CP:$NEXT"
+done
+for hen in $HENSHIN; do
+ NEXT="$WORKSPACE/$hen/bin"
+ CP="$CP:$NEXT"
+done
+
+sync
+cd $WORKSPACE/org.eclipse.emf.henshin.examples
+java -Xms$MAX_MEMORY -Xmx$MAX_MEMORY -Dfile.encoding=UTF-8 -classpath $CP org.eclipse.emf.henshin.examples.diningphils.DiningPhilsBenchmark $@
+cd - > /dev/null
+

Back to the top