Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
4dabbcdd
Commit
4dabbcdd
authored
Jan 30, 2017
by
Björn Richerzhagen
Browse files
DAO: Remove SEED from persisted workload to enable automagic plotting
parent
0ae3b4f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/util/db/dao/metric/ExperimentDAO.java
View file @
4dabbcdd
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment