Commit b0c2f490 authored by Erwan Bousse's avatar Erwan Bousse
Browse files

Correcting wrong end lines of evaluation scripts and correcting the R script...

Correcting wrong end lines of evaluation scripts and correcting the R script that couldn't parse correctly recently generated csv files
parent 267ac0fd
......@@ -3,6 +3,8 @@ library(scales)
options( StringsAsFactors=F )
###
# To prepare the ploting with a file of a name and a format (svg of pdf)
###
......@@ -26,6 +28,13 @@ getValue <- function(data, mmname, cloningname, nbclones, column) {
}
###
# Converts a "factor" column to a "numeric" column.
###
toNum <- function(a) {
return (as.numeric(levels(a))[a])
}
###
# Computes and return an operation that, for a given row,
......@@ -84,7 +93,7 @@ preprocessData <- function (rawdata) {
# Enforcing the order of the cloning techniques column
# https://stackoverflow.com/questions/19710986/how-to-make-acast-preserve-order-of-variable-in-reshape2
rawdata$CloningTechnique = factor(rawdata$CloningTechnique, techniques)
#rawdata$CloningTechnique = factor(rawdata$CloningTechnique, techniques)
return(rawdata)
......@@ -192,7 +201,9 @@ plotStuff <- function(rawdata, measure, variable, numberOfClones, cloning, style
# Type=h pour mettre des petits batons, lwd pour l'épaisseur des traits
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")
#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) {
......@@ -211,7 +222,7 @@ addPointsPlotStuff <- function(rawdata, measure,variable, numberOfClones, clonin
mutclassonly = data[data$CloningTechnique==cloning & data$NumberOfClones==numberOfClones,]
points(mutclassonly[,c(variable)], mutclassonly[,c(measure)], pch=style)
text(mutclassonly[,c(variable)], mutclassonly[,c(measure)], mutclassonly[,c("MetamodelName")], cex=0.6, pos=1, col="red")
#text(mutclassonly[,c(variable)], mutclassonly[,c(measure)], mutclassonly[,c("MetamodelName")], cex=0.6, pos=1, col="red")
}
......@@ -246,28 +257,37 @@ data = preprocessData(myrawdata)
# 1:ShareObjects, 2:ShareFields, 3:ShareAll, 4:NoShare
pointsStyles=c(15,4,2,1)
data$NoObjShareShareablePropertiesInPartShareableClassesDensity = toNum(data$NoObjShareShareablePropertiesInPartShareableClassesDensity)
data$ObjShareShareableClassesRatio = toNum(data$ObjShareShareableClassesRatio)
#
# Plotting performance /!\ FILTERING + ONLY PROXY TECHNIQUES
#
perfdata=data[(data$CloneModelPerformance>-1.0) & data$NoObjShareShareablePropertiesInPartShareableClassesDensity<30,]
perfdata=data[(data$CloneModelPerformance>-1.0),]# & data$NoObjShareShareablePropertiesInPartShareableClassesDensity<30,]
plotStuff (perfdata,'PerfGain','NoObjShareShareablePropertiesInPartShareableClassesDensity', 1, 'ShareFieldsOnly', pointsStyles[2], -1, -1,FALSE)
addPointsPlotStuff(perfdata,'PerfGain','NoObjShareShareablePropertiesInPartShareableClassesDensity', 1, 'ShareAll',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, 'ShareAll', pointsStyles[3], 1, 1, TRUE)
#addPointsPlotStuff(data, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 1000, 'LightDeep', pointsStyles[2])
addPointsPlotStuff(data, 'MemoryGainDeep', 'ObjShareShareableClassesRatio', 1000, 'ShareObjOnly', pointsStyles[1])
legend("right", c("ShareObjectsOnly","ShareAll"), cex=1, bty="n", pch=c(pointsStyles[1],pointsStyles[3]))
legend(0.7,0.15, c("ShareObjectsOnly","ShareAll"), cex=1, bty="n", pch=c(pointsStyles[1],pointsStyles[3]))
#
# Plotting the memory gain (sharefields)
#
sharefieldsdata=data[data$NoObjShareShareablePropertiesInPartShareableClassesDensity<30,]
sharefieldsdata=data#[data$NoObjShareShareablePropertiesInPartShareableClassesDensity<30,]
plotStuff(sharefieldsdata, 'MemoryGainDeep', 'NoObjShareShareablePropertiesInPartShareableClassesDensity', 1000, 'ShareFieldsOnly', pointsStyles[2], -1, 1, FALSE)
legend("topleft", c("ShareFieldsOnly"), cex=1, bty="n", pch=c(pointsStyles[2]))
legend(160,0.1, c("ShareFieldsOnly"), cex=1, bty="n", pch=c(pointsStyles[2]))
#
......
......@@ -20,7 +20,7 @@ done
# To reset registered OSGi bundles
rm -rf "$BENCHTOOLDIR/configuration/org.eclipse.osgi"
$TOOL --benchmarkMetamodels=$BUNDLES --nbClones 1 --nbtries 5 --outputFile $OUTPUTFOLDER/resultsFinal1.csv --dumpsFolder=/tmp2/cloningDumpsAll
#$TOOL --benchmarkMetamodels=$BUNDLES --nbClones 1 --nbtries 5 --outputFile $OUTPUTFOLDER/resultsFinal1.csv --dumpsFolder=/tmp2/cloningDumpsAll
#$TOOL --benchmarkMetamodels=$BUNDLES --nbClones 10 --nbtries 5 --outputFile $OUTPUTFOLDER/resultsFinal10.csv --dumpsFolder=/tmp2/cloningDumpsAll
#$TOOL --benchmarkMetamodels=$BUNDLES --nbClones 100 --nbtries 5 --outputFile $OUTPUTFOLDER/resultsFinal100.csv --dumpsFolder=/tmp2/cloningDumpsAll
$TOOL --benchmarkMetamodels=$BUNDLES --nbClones 1000 --nbtries 5 --outputFile $OUTPUTFOLDER/resultsFinal1000.csv --dumpsFolder=/tmp2/cloningDumpsAll
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment