Skip to content
Snippets Groups Projects
Commit 857b193c authored by Nikolaus Huber's avatar Nikolaus Huber
Browse files

git-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/code/DMM/trunk@12296 9e42b895-fcda-4063-8a3b-11be15eb1bbd
parent c25b709a
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ package edu.kit.ipd.descartes.adaptation.util;
import edu.kit.ipd.descartes.adaptation.TacticExecutor;
import edu.kit.ipd.descartes.mm.adaptation.WeightedTactic;
import edu.kit.ipd.descartes.mm.resourcelandscape.ComputingInfrastructure;
import edu.kit.ipd.descartes.mm.resourcelandscape.DistributedDataCenter;
public class BlueYonderExperimentTracker implements IObserver {
......@@ -77,4 +79,27 @@ public class BlueYonderExperimentTracker implements IObserver {
instance = new BlueYonderExperimentTracker();
return instance;
}
public String getExperimentNameForDistributedDataCenter(DistributedDataCenter distributedDataCenter) {
int[] psInstances = new int[4];
for (int i = 0; i < psInstances.length; i++)
{
try {
psInstances[i] = ((ComputingInfrastructure) distributedDataCenter.getConsistsOf().get(0).getContains().get(i)).getContains().size();
} catch (Exception e) {
psInstances[i] = 0;
}
}
String result = RESULT_NAME_TEMPLATE;
if (psInstances[0] > 0)
result = RESULT_NAME_TEMPLATE.replace("$1", psInstances[0] + "ps-desc1-");
else
result = RESULT_NAME_TEMPLATE.replace("$1", "");
result = result.replace("$2", Integer.toString(psInstances[3]));
return result;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment