Disabled repeated merger efficiency tests due to build pipeline
slowdown. Also focus the remaining test on efficiency and not
node/edge count.
package eu.fasten.core.merge;
-import it.unimi.dsi.fastutil.longs.LongLongPair;
+import eu.fasten.core.data.ExtendedRevisionJavaCallGraph;
+import org.json.JSONObject;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
import java.io.File;
import java.io.IOException;
import java.lang.management.ManagementFactory;
@@ -31,14 +36,6 @@ import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
-import org.json.JSONObject;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
-import eu.fasten.core.data.ExtendedRevisionJavaCallGraph;
-
public class MergerEfficiencyTests {
private static List<ExtendedRevisionJavaCallGraph> depSet;
@@ -80,28 +77,5 @@ public class MergerEfficiencyTests {
Assertions.assertTrue(
secondsTaken < 25, "CPU time used for merging should be less than 25 seconds, but was " + secondsTaken);
- //TODO fixes the build. Look into different environment details to find what is causing
- // the fail.
-// Assertions.assertEquals(50513, numNodes);
- Assertions.assertEquals(764288, numEdges);
- }
-
- @Test
- public void localMergerRepeatedEfficiencyTests() {
- ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
-
- for(int k = 10; k -- != 0;) {
- long timeBefore = threadMXBean.getCurrentThreadCpuTime();
- var merger = new CGMerger(depSet);
- var result = merger.mergeAllDeps();
- long timeAfter = threadMXBean.getCurrentThreadCpuTime();
-
- double secondsTaken = (timeAfter - timeBefore) / 1e9;
- DecimalFormat df = new DecimalFormat("###.###");
- int numNodes = result.numNodes();
- long numEdges = result.numArcs();
- System.out.println("CPU time used for merging: " + df.format(secondsTaken) + " seconds." +
- " Merged graph has " + numNodes + " nodes and " + numEdges + " edges.");
- }
}
}
