Commit 178b9440 authored by Erwan Bousse's avatar Erwan Bousse
Browse files

Beggining maveninsation

parent 5ab9e438
#Tue Apr 01 10:52:48 CEST 2014
artifact.attached.p2metadata=/home/ebousse/Dev/modelCloning/emf/fr.inria.diverse.cloning.runtime/target/p2content.xml
artifact.main=/home/ebousse/Dev/modelCloning/emf/fr.inria.diverse.cloning.runtime/target/fr.inria.diverse.cloning.runtime-0.1.0-SNAPSHOT.jar
artifact.attached.p2artifacts=/home/ebousse/Dev/modelCloning/emf/fr.inria.diverse.cloning.runtime/target/p2artifacts.xml
#Generated by Maven
#Tue Apr 01 10:52:48 CEST 2014
version=0.1.0-SNAPSHOT
groupId=fr.inria.diverse.cloning
artifactId=fr.inria.diverse.cloning.runtime
<?xml version='1.0' encoding='UTF-8'?>
<?artifactRepository version='1.1.0'?>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='fr.inria.diverse.cloning.runtime' version='0.1.0.201404010852'>
<properties size='5'>
<property name='artifact.size' value='27375'/>
<property name='download.size' value='27375'/>
<property name='maven-groupId' value='fr.inria.diverse.cloning'/>
<property name='maven-artifactId' value='fr.inria.diverse.cloning.runtime'/>
<property name='maven-version' value='0.1.0-SNAPSHOT'/>
</properties>
</artifact>
</artifacts>
<?xml version='1.0' encoding='UTF-8'?>
<units size='1'>
<unit id='fr.inria.diverse.cloning.runtime' version='0.1.0.201404010852'>
<update id='fr.inria.diverse.cloning.runtime' range='[0.0.0,0.1.0.201404010852)' severity='0'/>
<properties size='4'>
<property name='org.eclipse.equinox.p2.name' value='fr.inria.diverse.cloning.base'/>
<property name='maven-groupId' value='fr.inria.diverse.cloning'/>
<property name='maven-artifactId' value='fr.inria.diverse.cloning.runtime'/>
<property name='maven-version' value='0.1.0-SNAPSHOT'/>
</properties>
<provides size='9'>
<provided namespace='org.eclipse.equinox.p2.iu' name='fr.inria.diverse.cloning.runtime' version='0.1.0.201404010852'/>
<provided namespace='osgi.bundle' name='fr.inria.diverse.cloning.runtime' version='0.1.0.201404010852'/>
<provided namespace='java.package' name='fr.inria.diverse.cloning.runtime.cloner' version='0.0.0'/>
<provided namespace='java.package' name='fr.inria.diverse.cloning.runtime.cloner.impl' version='0.0.0'/>
<provided namespace='java.package' name='fr.inria.diverse.cloning.runtime.common' version='0.0.0'/>
<provided namespace='java.package' name='fr.inria.diverse.cloning.runtime.emfextension' version='0.0.0'/>
<provided namespace='java.package' name='fr.inria.diverse.cloning.runtime.emfextension.impl' version='0.0.0'/>
<provided namespace='java.package' name='fr.inria.diverse.cloning.runtime.util' version='0.0.0'/>
<provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
</provides>
<requires size='5'>
<required namespace='osgi.bundle' name='org.eclipse.emf.ecore' range='2.9.1'/>
<required namespace='osgi.bundle' name='org.eclipse.emf.ecore.xmi' range='2.9.1'/>
<required namespace='osgi.bundle' name='org.eclipse.ui.console' range='3.5.200'/>
<required namespace='osgi.bundle' name='org.eclipse.jface' range='3.9.1'/>
<required namespace='osgi.bundle' name='org.eclipse.ui' range='3.105.0'/>
</requires>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='fr.inria.diverse.cloning.runtime' version='0.1.0.201404010852'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='manifest'>
Bundle-SymbolicName: fr.inria.diverse.cloning.runtime;singleton:=true&#xA;Bundle-Version: 0.1.0.201404010852&#xA;
</instruction>
</instructions>
</touchpointData>
</unit>
</units>
#!/bin/bash
R --no-save --args $1 < ~/Dev/modelCloning/emf/process-data.R
RARGS=""
for i in "$@"
do
RARGS="$RARGS $i"
done
R --no-save --args $RARGS < ~/Dev/modelCloning/emf/process-data.R
ls *.pdf | xargs -I '{}' pdfcrop '{}' '{}'
#!/bin/bash
R --no-save --args results.csv < ~/Dev/modelCloning/emf/process-data.R
RARGS=""
ls *.pdf | xargs -I '{}' pdfcrop '{}' '{}'
for i in "$@"
do
RARGS="$RARGS $i"
done
R --no-save --args $RARGS < ~/Dev/modelCloning/emf/process-data.R
#ls *.pdf | xargs -I '{}' pdfcrop '{}' '{}'
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.inria.diverse.cloning</groupId>
<artifactId>parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>fr.inria.diverse.cloning.runtime</module>
<module>fr.inria.diverse.cloning.materialgenerator</module>
</modules>
<properties>
<tycho.version>0.20.0</tycho.version>
<!--<tycho-extras.version>[0.19.0,)</tycho-extras.version>-->
<kepler-repo.url>http://download.eclipse.org/releases/kepler</kepler-repo.url>
</properties>
<repositories>
<repository>
<id>kepler</id>
<url>${kepler-repo.url}</url>
<layout>p2</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<groupId>fr.inria.diverse.cloning</groupId>
<artifactId>parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>fr.inria.diverse.cloning.runtime</module>
<module>fr.inria.diverse.cloning.materialgenerator</module>
</modules>
<properties>
<tycho.version>0.20.0</tycho.version>
<!--<tycho-extras.version>[0.19.0,)</tycho-extras.version>-->
<kepler-repo.url>http://download.eclipse.org/releases/kepler</kepler-repo.url>
</properties>
<repositories>
<repository>
<id>kepler</id>
<url>${kepler-repo.url}</url>
<layout>p2</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
......@@ -2,6 +2,10 @@ library(reshape2)
library(scales)
###
# To prepare the ploting with a file of a name and a format (svg of pdf)
###
initImage <- function(name, extension) {
#par(mar=c(0,0,0,0), mgp=c(0,0,0,0))
......@@ -13,24 +17,30 @@ initImage <- function(name, extension) {
}
getMemoryUsed <- function(data, mmname, cloningname, nbclones) {
value = data[data$MetamodelName==mmname & data$CloningTechnique==cloningname & data$NumberOfClones==nbclones, c('MemoryUsed')]
###
# Retrieves in a df the memory used in a given run
###
getValue <- function(data, mmname, cloningname, nbclones, column) {
value = data[data$MetamodelName==mmname & data$CloningTechnique==cloningname & data$NumberOfClones==nbclones, c(column)]
return(value)
}
computeMemoryGainCreator <- function(rawdata, cloningName) {
###
# Computes and return an operation that, for a given row,
# computes memory gain with regards to another cloning technique
###
computeGainCreator <- function(rawdata, cloningName, column) {
numberClonesColumn = which(colnames(rawdata)=="NumberOfClones")
totalMemoryColumn = which(colnames(rawdata)=="MemoryUsed")
totalMemoryColumn = which(colnames(rawdata)==column)
nameColumn = which(colnames(rawdata)=="MetamodelName")
computeMemoryRatio <- function(row) {
totalMemory <- as.integer(row[totalMemoryColumn])
name <- as.character(row[nameColumn])
nbClones <- as.integer(row[numberClonesColumn])
otherCloningMemory = getMemoryUsed(rawdata, name, cloningName,nbClones)
otherCloningMemory = getValue(rawdata, name, cloningName,nbClones,column)
result = ((otherCloningMemory - totalMemory) / otherCloningMemory)
return(result)
}
......@@ -41,26 +51,36 @@ computeMemoryGainCreator <- function(rawdata, cloningName) {
###
# Preprocessing: new columns, enforce order, etc.
###
preprocessData <- function (rawdata) {
# We merge the columns cloningtechnique and light (to create "LightDeep" for instance)
rawdata$CloningTechnique = paste(rawdata$Light, rawdata$CloningTechnique, sep="")
#rawdataWithoutLabels <- matrix(as.matrix(rawdata), ncol = ncol(rawdata), dimnames = NULL)
# For each line, we compute the gain compared to three out of four techniques, and we put it in
# Note that the "1" indicates "compute for each row" as opposed to "2"
rawdata$MemoryGainDeep = apply(rawdata,1,computeMemoryGainCreator(rawdata, 'Deep'))
rawdata$MemoryGainLightDeep = apply(rawdata,1,computeMemoryGainCreator(rawdata, 'LightDeep'))
rawdata$MemoryGainMutClassOnly = apply(rawdata,1,computeMemoryGainCreator(rawdata, 'MutClassOnly'))
rawdata$MemoryGainDeep = apply(rawdata,1,computeGainCreator(rawdata, 'Deep', "MemoryUsed"))
rawdata$MemoryGainLightDeep = apply(rawdata,1,computeGainCreator(rawdata, 'LightDeep',"MemoryUsed"))
rawdata$MemoryGainMutClassOnly = apply(rawdata,1,computeGainCreator(rawdata, 'MutClassOnly',"MemoryUsed"))
rawdata$TimeGainDeep = apply(rawdata,1,computeGainCreator(rawdata, 'Deep', "TimeSpent"))
rawdata$TimeGainLightDeep = apply(rawdata,1,computeGainCreator(rawdata, 'LightDeep',"TimeSpent"))
rawdata$TimeGainMutClassOnly = apply(rawdata,1,computeGainCreator(rawdata, 'MutClassOnly',"TimeSpent"))
# Performance gain as well
rawdata$PerfGain = ((rawdata$OriginalModelPerformance - rawdata$CloneModelPerformance)/rawdata$OriginalModelPerformance)
print ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa")
thousand = rawdata[rawdata$NumberOfClones==1000 & rawdata$CloningTechnique=="LightDeep",]
print(median(thousand$PerfGain))
print ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa")
thousand = rawdata[rawdata$NumberOfClones==1000 & rawdata$CloningTechnique=="LightMutClassOnly",]
print(median(thousand$PerfGain))
print ("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAa")
# Getting the list of cloning techniques, in the right order
techniques = unique(rawdata$CloningTechnique)
......@@ -74,12 +94,12 @@ preprocessData <- function (rawdata) {
#
###
# Creates a barplot that compares a given metamodel on one aspect (memory or time) for numerous "number of clones" values
#
###
plotNumberOfClones <- function(rawdata, metamodelname, minvalue, maxvalue, measure, title){
prefiltered = preprocessData(rawdata)
prefiltered = rawdata
filtered = prefiltered[prefiltered$MetamodelName==metamodelname & prefiltered$NumberOfClones<=maxvalue & prefiltered$NumberOfClones>=minvalue & prefiltered$CloningTechnique!="Deep",
c(measure,'CloningTechnique', 'NumberOfClones')]
......@@ -100,12 +120,13 @@ plotNumberOfClones <- function(rawdata, metamodelname, minvalue, maxvalue, measu
myylab=measure
if (measure == "MemoryGainDeep") {
myylab = "memory gain over NoShare"
myylab = "memory gain over DeepClone"
}
for (format in formats) {
initImage(name,format)
barplot(as.matrix(result), main=title, xlab= "number of clones", ylab=myylab,beside=TRUE, col=colors)
barplot(as.matrix(result), main=title, xlab= "number of clones", ylab=myylab,beside=TRUE, col=colors, yaxt="n")
axis(2, at=pretty(filtered[,c(measure)]), lab=paste0(pretty(filtered[,c(measure)]) * 100,"%"), las=TRUE,pos=0)
legend("topleft", as.vector(legendc), cex=1, bty="n", fill=colors);
}
......@@ -115,8 +136,10 @@ plotNumberOfClones <- function(rawdata, metamodelname, minvalue, maxvalue, measu
plotStuff <- function(rawdata, measure, variable, numberOfClones, cloning, style, maxX, maxY, title) {
###
# Creates a plot... mostly used for memory
###
plotStuff <- function(rawdata, measure, variable, numberOfClones, cloning, style, maxX, maxY, percentX) {
myxlim = NULL
if (maxX > 0) {
myxlim = c(0,maxX)
......@@ -131,121 +154,176 @@ plotStuff <- function(rawdata, measure, variable, numberOfClones, cloning, style
myxlab = "proportion of shareable classes (case ObjShare)"
}
if (variable == "NoObjShareShareablePropertiesInPartShareableClassesDensity") {
myxlab = "density of shareable properties in part shareable classes (case NoObjShare)"
myxlab = "density of shareable properties in part shareable classes\n (ShareFieldsOnly strategy)"
}
if (variable == "ObjShareShareablePropertiesInPartShareableClassesDensity") {
myxlab = "density of shareable properties in part shareable classes (case ObjShare)"
myxlab = "density of shareable properties in part shareable classes\n (ShareBoth strategy)"
}
if (variable == "ObjShareShareableClassesRatio") {
myxlab = "proportion of shareable classes (ShareObjectsOnly strategy)"
}
if (variable == "NoObjShareShareablePropertiesInPartShareableClassesDensity") {
myxlab = "density of shareable properties in part shareable classes\n (ShareFieldsOnly strategy)"
}
if (variable == "ObjShareShareablePropertiesInPartShareableClassesDensity") {
myxlab = "density of shareable properties in part shareable classes\n (ShareBoth strategy)"
}
myylab=measure
if (measure == "MemoryGainDeep") {
myylab = "memory gain over NoShare"
myylab = "memory gain over DeepClone"
}
if (measure == "MemoryGainLightDeep") {
myylab = "memory gain over ShareFields"
myylab = "memory gain over ShareFieldsOnly"
}
if (measure == "MemoryGainMutClassOnly") {
myylab = "memory gain over ShareObjects"
myylab = "memory gain over ShareObjectsOnly"
}
if (measure == "PerfGain") {
myylab = "Model manipulation efficiency gain over the original model"
}
data = preprocessData(rawdata)
data = rawdata
mutclassonly = data[data$CloningTechnique==cloning & data$NumberOfClones==numberOfClones,]
initImage(paste(cloning,measure,sep=""),'pdf')
initImage(paste(cloning,measure,variable,sep=""),'pdf')
# Type=h pour mettre des petits batons, lwd pour l'épaisseur des traits
plot(mutclassonly[,c(variable)], mutclassonly[,c(measure)],ylim=myylim, pch=style, xlab=myxlab, xlim=myxlim, ylab=myylab, yaxt="n")#, type="h", lwd="3")#, main=title)
axis(2, at=pretty(mutclassonly[,c(measure)]), lab=paste0(pretty(mutclassonly[,c(measure)]) * 100,"%"), las=TRUE)
plot(mutclassonly[,c(variable)], mutclassonly[,c(measure)], pch=style, xlab=myxlab, ylab=myylab, yaxt="n", xaxt="n",frame=F)#, xlim=myxlim, ylim=myylim)#, type="h", lwd="3")#, main=title)
#text(mutclassonly[,c(variable)], mutclassonly[,c(measure)], mutclassonly[,c("MetamodelName")], cex=0.6, pos=1, col="red")
axis(2, at=pretty(mutclassonly[,c(measure)]), lab=paste0(pretty(mutclassonly[,c(measure)]) * 100,"%"), las=TRUE,pos=0)
if (percentX) {
axis(1, at=pretty(mutclassonly[,c(measure)]), lab=paste0(pretty(mutclassonly[,c(measure)]) * 100,"%"), las=TRUE,pos=0)
} else {
axis(1, at=pretty(mutclassonly[,c(variable)]), pos=0)
}
}
###
# Adds points to a plot created with "plotStuff"
###
addPointsPlotStuff <- function(rawdata, measure,variable, numberOfClones, cloning, style) {
data = preprocessData(rawdata)
data = rawdata
mutclassonly = data[data$CloningTechnique==cloning & data$NumberOfClones==numberOfClones,]
points(mutclassonly[,c(variable)], mutclassonly[,c(measure)], pch=style)
points(mutclassonly[,c(variable)], mutclassonly[,c(measure)], pch=style)
}
plotPerf<- function(rawdata, variable, numberOfClones, cloning, style, maxX, maxY, title) {
data = preprocessData(rawdata)
###################################################################################################################################
###################################################################################################################################
###################################################################################################################################
mutclassonly = data[data$CloningTechnique==cloning & data$NumberOfClones==numberOfClones & (data$CloneModelPerformance>-1.0),]
myxlab=variable
if (variable == "ObjShareShareableClassesRatio") {
myxlab = "proportion of shareable classes (case ObjShare)"
}
if (variable == "NoObjShareShareablePropertiesInPartShareableClassesDensity") {
myxlab = "density of shareable properties in part shareable classes (case NoObjShare)"
}
if (variable == "ObjShareShareablePropertiesInPartShareableClassesDensity") {
myxlab = "density of shareable properties in part shareable classes (case ObjShare)"
}
initImage(paste(cloning,'PerfGain',sep=""),'pdf')
args = commandArgs(TRUE)
# Type=h pour mettre des petits batons, lwd pour l'épaisseur des traits
plot(mutclassonly[,c(variable)], mutclassonly[,c('PerfGain')], pch=style, xlab=myxlab,ylab="performance gain compared to the original model", yaxt="n", xaxt='n')#, type="h", lwd="3")#, main=title)
axis(1, at=pretty(mutclassonly[,c(variable)]), pos=0)
axis(2, at=pretty(mutclassonly[,c('PerfGain')]), lab=paste0(pretty(mutclassonly[,c('PerfGain')]) * 100,"%"), las=TRUE)
}
myrawdata = c()
addPointsPlotPerf<- function(rawdata, variable, numberOfClones, cloning, style) {
if (length(args)==1) {
myrawdata = read.csv(args)
} else {
data = preprocessData(rawdata)
mutclassonly = data[data$CloningTechnique==cloning & data$NumberOfClones==numberOfClones & (data$CloneModelPerformance>-1.0),]
points(mutclassonly[,c(variable)], mutclassonly[,c('PerfGain')], pch=style)
for (arg in args) {
# Parsing CSV file
newdata = read.csv(arg)
if (length(myrawdata) == 0) {
myrawdata = newdata
} else {
myrawdata = rbind(myrawdata,newdata)
}
}
}
data = preprocessData(myrawdata)
arg = commandArgs(TRUE)
# Parsing CSV file
myrawdata = read.csv(arg)
# Plotting performance
# 1:ShareObjects, 2:ShareFields, 3:ShareAll, 4:NoShare
pointsStyles=c(15,4,2,1)
plotPerf (myrawdata,'NoObjShareShareablePropertiesInPartShareableClassesDensity', 1, 'LightDeep', pointsStyles[2], -1, -1, "")
addPointsPlotPerf(myrawdata,'NoObjShareShareablePropertiesInPartShareableClassesDensity', 1, 'MutClassOnly',pointsStyles[1])
addPointsPlotPerf(myrawdata,'NoObjShareShareablePropertiesInPartShareableClassesDensity', 1, 'LightMutClassOnly',pointsStyles[3])
addPointsPlotPerf(myrawdata,'NoObjShareShareablePropertiesInPartShareableClassesDensity', 1, 'Deep',pointsStyles[4])
legend("topright", c("ShareObjectsOnly","ShareFieldsOnly","ShareAll", "NoShare"), cex=1, bty="n", pch=pointsStyles);
# Plotting the memory gain graph (all metamodels)
plotStuff (myrawdata, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 100, 'LightMutClassOnly', pointsStyles[3], 1, 1, "Memory gain of ShareObjects compared to NoShare")
addPointsPlotStuff(myrawdata, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 100, 'LightDeep', pointsStyles[2])
addPointsPlotStuff(myrawdata, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 100, 'MutClassOnly', pointsStyles[1])
legend("topleft", c("ShareObjectsOnly","ShareFieldsOnly","ShareAll"), cex=1, bty="n", pch=c(15,4,2));
#
# Plotting performance /!\ FILTERING + ONLY PROXY TECHNIQUES
#
perfdata=data[(data$CloneModelPerformance>-1.0) & data$NoObjShareShareablePropertiesInPartShareableClassesDensity<30,]
plotStuff (perfdata,'PerfGain','NoObjShareShareablePropertiesInPartShareableClassesDensity', 1, 'LightDeep', pointsStyles[2], -1, -1,FALSE)
addPointsPlotStuff(perfdata,'PerfGain','NoObjShareShareablePropertiesInPartShareableClassesDensity', 1, 'LightMutClassOnly',pointsStyles[3])
legend("topright", c("ShareFieldsOnly","ShareAll"), cex=1, bty="n", pch=pointsStyles[2:3])
#
# Plotting the memory gain graph (all metamodels) for shareobjects
#
plotStuff (data, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 1000, 'LightMutClassOnly', pointsStyles[3], 1, 1, TRUE)
#addPointsPlotStuff(data, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 1000, 'LightDeep', pointsStyles[2])
addPointsPlotStuff(data, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 1000, 'MutClassOnly', pointsStyles[1])
legend("right", c("ShareObjectsOnly","ShareAll"), cex=1, bty="n", pch=c(pointsStyles[1],pointsStyles[3]))
#
# Plotting the memory gain (sharefields)
#
sharefieldsdata=data[data$NoObjShareShareablePropertiesInPartShareableClassesDensity<30,]
plotStuff(sharefieldsdata, 'MemoryGainDeep', 'NoObjShareShareablePropertiesInPartShareableClassesDensity', 1000, 'LightDeep', pointsStyles[2], -1, 1, FALSE)
legend("topleft", c("ShareFieldsOnly"), cex=1, bty="n", pch=c(pointsStyles[2]))
#
# Plotting the Time gain graph (all metamodels) for shareobjects
#
#plotStuff (data, 'TimeGainDeep', 'ObjShareShareableClassesRatio', 100, 'LightMutClassOnly', pointsStyles[3], 1, 1, "")
#addPointsPlotStuff(data, 'TimeGainDeep', 'ObjShareShareableClassesRatio', 1000, 'LightDeep', pointsStyles[2])
#addPointsPlotStuff(data, 'TimeGainDeep', 'ObjShareShareableClassesRatio', 100, 'MutClassOnly', pointsStyles[1])
#legend("topleft", c("ShareObjectsOnly","ShareAll"), cex=1, bty="n", pch=c(pointsStyles[1],pointsStyles[3]))
#
# Plotting the time gain (sharefields)
#
#plotStuff(sharefieldsdata, 'TimeGainDeep', 'NoObjShareShareablePropertiesInPartShareableClassesDensity', 100, 'LightDeep', pointsStyles[2], -1, 1, "")
#
# Plotting the nbclones-not-relevant graph (note : RANDOMLY CHOSEN METAMODEL)
plotNumberOfClones(myrawdata, "mm6", 0, 100, 'MemoryGainDeep', "")
#
plotNumberOfClones(data, "bundle1-mm9", 0, 10000, 'MemoryGainDeep', "")
############################################################ tests
#plotStuff(data, 'MemoryGainLightDeep', 'ObjShareShareableClassesRatio', 1000, 'LightMutClassOnly', 15, 1, 1, "Memory gain of ShareBoth compared to ShareFields")
#plotStuff(data, 'MemoryGainDeep', 'NoObjShareShareablePropertiesInPartShareableClassesDensity', 1000, 'LightDeep', 15, -1, 1, "Memory gain of ShareFields compared to NoShare")
##plotStuff(myrawdata, 'MemoryGainLightDeep', 'ObjShareShareableClassesRatio', '10', 'LightMutClassOnly', 1, 1, "Memory gain of ShareBoth compared to ShareFields")
#plotStuff(myrawdata, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 100, 'LightDeep', 15, -1, -1, "Memory gain of ShareFields compared to NoShare")
##plotStuff(myrawdata, 'MemoryGainDeep', 'NoObjShareShareablePropertiesInPartShareableClassesDensity', '10', 'LightDeep', -1, 1, "Memory gain of ShareFields compared to NoShare")
#plotStuff(data, 'TimeGainDeep', 'ObjShareShareableClassesRatio', 10000, 'MutClassOnly', 15, -1, -1, "Time gain of ShareFields compared to NoShare")
#plotStuff(data[data$NoObjShareShareablePropertiesInPartShareableClassesDensity<100,], 'TimeGainDeep', 'NoObjShareShareablePropertiesInPartShareableClassesDensity', 100, 'LightDeep', 15, -1, -1, "Time gain of ShareFields compared to NoShare")
#plotStuff(data, 'TimeGainDeep', 'ObjShareShareableClassesRatio', 10000, 'LightMutClassOnly', 15, -1, -1, "Time gain of ShareFields compared to NoShare")
#plotStuff(myrawdata, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 1000, 'LightDeep', -1, 1, "Memory gain of ShareFields compared to NoShare")
#plotStuff(data, 'MemoryGainMutClassOnly', 'ObjShareShareablePropertiesInPartShareableClassesDensity', 1000, 'LightMutClassOnly', 15, -1, 1, "Memory gain of ShareBoth compared to ShareObjects")
##plotStuff(myrawdata, 'MemoryGainMutClassOnly', 'ObjShareShareablePropertiesInPartShareableClassesDensity', '10', 'LightMutClassOnly', -1, 1, "Memory gain of ShareBoth compared to ShareObjects")
#plotStuff(myrawdata, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 1000, 'LightMutClassOnly', 1, 1, "Memory gain of ShareBoth compared to NoShare")
#plotStuff(myrawdata, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 100, 'LightMutClassOnly',15, -1, -1, "Memory gain of ShareBoth compared to NoShare")
......@@ -2,6 +2,10 @@ library(reshape2)
library(scales)
###
# To prepare the ploting with a file of a name and a format (svg of pdf)
###
initImage <- function(name, extension) {
#par(mar=c(0,0,0,0), mgp=c(0,0,0,0))
......@@ -13,24 +17,30 @@ initImage <- function(name, extension) {
}
getMemoryUsed <- function(data, mmname, cloningname, nbclones) {
value = data[data$MetamodelName==mmname & data$CloningTechnique==cloningname & data$NumberOfClones==nbclones, c('MemoryUsed')]
###
# Retrieves in a df the memory used in a given run
###
getValue <- function(data, mmname, cloningname, nbclones, column) {
value = data[data$MetamodelName==mmname & data$CloningTechnique==cloningname & data$NumberOfClones==nbclones, c(column)]
return(value)
}
computeMemoryGainCreator <- function(rawdata, cloningName) {
###