Commit 4dabbcdd authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

DAO: Remove SEED from persisted workload to enable automagic plotting

parent 0ae3b4f1
......@@ -21,6 +21,10 @@
package de.tud.kom.p2psim.impl.util.db.dao.metric;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import de.tud.kom.p2psim.impl.simengine.Simulator;
import de.tud.kom.p2psim.impl.util.db.dao.DAO;
......@@ -61,13 +65,20 @@ public class ExperimentDAO extends DAO {
long seed = Simulator.getSeed();
String system = Simulator.getInstance().getConfigurator()
.getResolvedConfiguration();
// FIXME: The following has to be uncommented again.
// String workload = Simulator.getInstance().getConfigurator()
// .getVariables().toString();
Map<String, String> vars = new LinkedHashMap<>(Simulator.getInstance().getConfigurator()
.getVariables());
// Remove seed for database copy
List<String> keys = new LinkedList<>(vars.keySet());
for (String key : keys) {
if (key.equalsIgnoreCase("seed")) {
vars.remove(key);
}
}
String workload = vars.toString();
String experimentDescription = Simulator.getMonitor()
.getExperimentDescription();
experiment = new Experiment(seed, actTime, experimentDescription,
system, "");
system, workload);
persistImmediately(experiment);
}
......
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