We wrote <i>bash</i> scripts to simplify the run of the evaluation. They are available in the folder <code>evaluation-scripts</code> of the [tool suite](../tools/evaluation).
*<code>generate-all</code> generates 10 OSGi bundles each with the java code for 10 generated metamodels
*<code>run-all</code> takes generated OSGi bundle as arguments, and run the evaluation for both 1 clone and 1000 clones
*<code>plot-all</code> takes generated CSV files as arguments, and created many plots to visualize the results
They can be easily run in a linux environement, but also in a Windows environment using [win-bash](http://win-bash.sourceforge.net/).
## Running
cd /path/to/evaluation-scripts
./generate-all
A folder <code>benchmarktool-workingdir</code> is created, in which will be created 10 OSGi bundles named bundle1.jar, bundle2.jar, etc.
./run-all benchmarktool-workingdir/*.jar
The evaluation starts, and eventually creates CSV files in <code>benchmarktool-workingdir</code>.
./plot-all benchmarktool-workingdir/*.csv
[R](http://www.r-project.org/) is called to plot the data, and PDF files are created in <code>benchmarktool-workingdir</code>.
In this second part we use the provided API to clone models using the different strategies. Here is a sample of code that creates a model using the same metamodel as previsously, and then clones it using the four cloning strategies:
In this second part we use the provided API to clone models using the different strategies. Here is a sample of code that creates a model using the same metamodel as previsously, and then clones it using the four cloning strategies:
<hr>
#!java
#!java
/* Creating a model */
/* Creating a model */
...
@@ -83,4 +83,3 @@ In this second part we use the provided API to clone models using the different
...
@@ -83,4 +83,3 @@ In this second part we use the provided API to clone models using the different
Cloner shareAllCloner = new ClonerImpl(MyMMShareAllCloningMaterial.getInstance());
Cloner shareAllCloner = new ClonerImpl(MyMMShareAllCloningMaterial.getInstance());
To measure the obtained memory gains when using Moclodash for cloning models, we made a complete evaluation tool suite.
## Downloading the tool
You can download the latest build of the evaluation tool suite at [this page](https://ci.inria.fr/moclodash/job/moclodash-evaluation/lastSuccessfulBuild/).
You can download the latest build of the evaluation tool suite at [this page](https://ci.inria.fr/moclodash/job/moclodash-evaluation/lastSuccessfulBuild/).
Five versions are available:
Five versions are available:
...
@@ -15,3 +19,68 @@ Five versions are available:
...
@@ -15,3 +19,68 @@ Five versions are available:
* Macos x86_64
* Macos x86_64
* Windows x86
* Windows x86
* Windows x86_64
* Windows x86_64
Note that this tool suite contains all the required dependencies, including the moclodash plugins themselves. Thus, you don't have to download them manually to run the evaluation.
Java 1.7 required.
## Using the tool
This CLI tool has three modes: <code>mmgen</code>, <code>matgen</code> and <code>run</code>.
### Metamodel generation mode
The mode <code>mmgen</code> is used to randomly generate metamodels (ie ecore models).
$ ./cloning-benchmark mmgen
Listening for transport dt_socket at address: 35337
* --maxClasses <Integer:natural> The maximum number of classes of a
metamodel.
* --maxMutProp <Integer:natural> The maximum number of mutable
properties of a metamodel.
* --maxProp <Integer:natural> The maximum number of properties of a
* --nbMetamodels <Integer:natural> The number of metamodels to generate.
* --outputFolder <File:path> The folder in which metamodels are
generated.
### Cloning material generation mode
The mode <code>matgen</code> is used to call Moclodash cloning material generator on a set of metamodels in order to generate an OSGi bundle ready for evaluation.
$ ./cloning-benchmark matgen
Listening for transport dt_socket at address: 60140
[INFO.] Starting cloning benchmark material generator.