Skip to content
Snippets Groups Projects
Commit ed612273 authored by Nikolaus Krismer's avatar Nikolaus Krismer
Browse files

changed runtimes...

...new values create smoother graphs
parent 2dc9aead
No related branches found
No related tags found
No related merge requests found
......@@ -45,19 +45,24 @@ public final class RuntimeComplex {
private static final Calendar ST_TIME = new GregorianCalendar(2010, 6, 14, 10, 30, 0);
private static final int IT_NODE_ID = 21;
private static final Calendar IT_TIME = new GregorianCalendar(2011, 9, 20, 15, 0, 0);
private static final String XML_RUNTIME = "build/reports/tests/algorithm-runtimes.xml";
private static final String RESULTFILE_XML_RUNTIME = "build/reports/tests/algorithm-runtimes.xml";
private static final int MAX_RUNTIME = 18000; // 5 hours;
private static final int RUNTIME_POINTS_PER_OFFSET = 12;
private static final int[] RUNTIME_OFFSETS = {
60, // 1 minute (in sec)
3600, // 1 hour (in sec)
86400 // 1 day (in sec)
};
private static Map<Integer, TestParameters> datasets = new TreeMap<>();
private static Map<String, Map<String, Long>> runtimes = new HashMap<>();
// launcher for visualVM
public static void main(final String[] args) {
final RuntimeComplex o = new RuntimeComplex();
// addDatasets();
// addAllDatasets();
final Set<Integer> times = new HashSet<>();
// CHECKSTYLE:OFF MagicNumber
times.add(7200);
// CHECKSTYLE:ON MagicNumber
times.add(MAX_RUNTIME);
addDatasetBZ(times);
System.out.println("Starting profiling:");
......@@ -79,11 +84,11 @@ public final class RuntimeComplex {
@AfterClass
public static void writeRuntimeXML() {
final Set<Entry<String, Map<String, Long>>> resultSet = runtimes.entrySet();
writeMapToXML(new File(XML_RUNTIME), resultSet, REPEAT_COUNT);
writeMapToXML(new File(RESULTFILE_XML_RUNTIME), resultSet, REPEAT_COUNT);
}
@BeforeClass
public static void addDatasets() {
public static void addAllDatasets() {
final Set<Integer> times = getTimeSet();
addDatasetBZ(times);
// addDatasetIT(times);
......@@ -141,18 +146,17 @@ public final class RuntimeComplex {
private static Set<Integer> getTimeSet() {
final Set<Integer> times = new TreeSet<Integer>();
// CHECKSTYLE:OFF MagicNumber
times.add(60); // 1 minute
times.add(120); // 2 minutes
times.add(240); // 4 minutes
times.add(480); // 8 minutes
times.add(900); // 15 minutes
times.add(1800); // 30 minutes
times.add(3600); // 1 hour
times.add(7200); // 2 hours
times.add(14400); // 4 hours
times.add(48000); // 8 hours
// CHECKSTYLE:ON MagicNumber
for (int offset : RUNTIME_OFFSETS) {
int stepWidth = (offset / RUNTIME_POINTS_PER_OFFSET);
for (int i = stepWidth; i < offset; i += stepWidth) {
int runtime = Math.max(offset, offset * i);
if (runtime > MAX_RUNTIME) {
return times;
}
times.add(runtime);
}
}
return times;
}
......
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