Skip to content

Commit 8bc444d

Browse files
committed
Remove memory measurements
1 parent c94c742 commit 8bc444d

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

src/main/java/com/github/javabdd/BDDFactory.java

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,51 +1382,6 @@ public MaxUsedBddNodesStats getMaxUsedBddNodesStats() {
13821382
return maxusedbddnodesstats;
13831383
}
13841384

1385-
/**
1386-
* Stores statistics about the maximum memory usage.
1387-
*
1388-
* @author mgoorden
1389-
*/
1390-
public static class MaxUsedMemoryStats {
1391-
protected boolean enabled = false;
1392-
protected long maxUsedMemory;
1393-
1394-
protected MaxUsedMemoryStats() { }
1395-
1396-
public void enableMeasurements() {
1397-
enabled = true;
1398-
}
1399-
1400-
public void disableMeasurements() {
1401-
enabled = false;
1402-
}
1403-
1404-
public void newMeasurement(long newMemory) {
1405-
maxUsedMemory = Math.max(newMemory, maxUsedMemory);
1406-
}
1407-
1408-
public long getMaxUsedMemory() {
1409-
return maxUsedMemory;
1410-
}
1411-
}
1412-
1413-
/**
1414-
* Singleton object for maximum used memory statistics.
1415-
*/
1416-
protected MaxUsedMemoryStats maxusedmemorystats = new MaxUsedMemoryStats();
1417-
1418-
/**
1419-
* <p>Return the current maximum used memory statistics for this BDD factory.</p>
1420-
*
1421-
* <p>Note that measuring max used memory usages fluctuates over time, tool
1422-
* implementation, used hardware, etc.</p>
1423-
*
1424-
* @return maximum used memory statistics
1425-
*/
1426-
public MaxUsedMemoryStats getMaxUsedMemoryStats() {
1427-
return maxusedmemorystats;
1428-
}
1429-
14301385
/**
14311386
* Stores continuously statistics about the BDD nodes usage and BDD operations,
14321387
* where BDD operations is a proxy for time.

src/main/java/com/github/javabdd/JFactory.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5067,11 +5067,6 @@ void bdd_add_per_stats() {
50675067
maxusedbddnodesstats.newMeasurement(usedBddNodes);
50685068
}
50695069

5070-
if (maxusedmemorystats.enabled) {
5071-
long memory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
5072-
maxusedmemorystats.newMeasurement(memory);
5073-
}
5074-
50755070
if (continuousstats.enabled) {
50765071
if (usedBddNodes == -1) usedBddNodes = bdd_used_nodes_count();
50775072
continuousstats.contUsedBddNodes.add(usedBddNodes);

0 commit comments

Comments
 (0)