@@ -1355,44 +1355,52 @@ public void enableMeasurements() {
1355
1355
enabled = true ;
1356
1356
}
1357
1357
1358
+ public void disableMeasurements () {
1359
+ enabled = false ;
1360
+ }
1361
+
1358
1362
public void newMeasurement (int newUsedBddNodes ) {
1359
1363
maxUsedBddNodes = Math .max (newUsedBddNodes , maxUsedBddNodes );
1360
1364
}
1361
1365
1362
- public int getMaxNodes () {
1366
+ public int getMaxUsedNodes () {
1363
1367
return maxUsedBddNodes ;
1364
1368
}
1365
1369
}
1366
1370
1367
1371
/**
1368
- * Singleton object for maximum BDD nodes statistics.
1372
+ * Singleton object for maximum used BDD nodes statistics.
1369
1373
*/
1370
- protected MaxUsedBddNodesStats maxbddnodesstats = new MaxUsedBddNodesStats ();
1374
+ protected MaxUsedBddNodesStats maxusedbddnodesstats = new MaxUsedBddNodesStats ();
1371
1375
1372
1376
/**
1373
- * <p>Return the current maximum BDD nodes statistics for this BDD factory.</p>
1377
+ * <p>Return the current maximum used BDD nodes statistics for this BDD factory.</p>
1374
1378
*
1375
- * @return maximum memory statistics
1379
+ * @return maximum used BDD statistics
1376
1380
*/
1377
- public MaxUsedBddNodesStats getMaxBddNodesStats () {
1378
- return maxbddnodesstats ;
1381
+ public MaxUsedBddNodesStats getMaxUsedBddNodesStats () {
1382
+ return maxusedbddnodesstats ;
1379
1383
}
1380
1384
1381
1385
/**
1382
1386
* Stores statistics about the maximum memory usage.
1383
1387
*
1384
1388
* @author mgoorden
1385
1389
*/
1386
- public static class MaxMemoryStats {
1390
+ public static class MaxUsedMemoryStats {
1387
1391
protected boolean enabled = false ;
1388
1392
protected long maxUsedMemory ;
1389
1393
1390
- protected MaxMemoryStats () { }
1394
+ protected MaxUsedMemoryStats () { }
1391
1395
1392
1396
public void enableMeasurements () {
1393
1397
enabled = true ;
1394
1398
}
1395
1399
1400
+ public void disableMeasurements () {
1401
+ enabled = false ;
1402
+ }
1403
+
1396
1404
public void newMeasurement (long newMemory ) {
1397
1405
maxUsedMemory = Math .max (newMemory , maxUsedMemory );
1398
1406
}
@@ -1403,50 +1411,55 @@ public long getMaxUsedMemory() {
1403
1411
}
1404
1412
1405
1413
/**
1406
- * Singleton object for maximum memory statistics.
1414
+ * Singleton object for maximum used memory statistics.
1407
1415
*/
1408
- protected MaxMemoryStats maxmemorystats = new MaxMemoryStats ();
1416
+ protected MaxUsedMemoryStats maxusedmemorystats = new MaxUsedMemoryStats ();
1409
1417
1410
1418
/**
1411
- * <p>Return the current maximum memory statistics for this BDD factory.</p>
1419
+ * <p>Return the current maximum used memory statistics for this BDD factory.</p>
1412
1420
*
1413
- * <p>Note that measuring max memory usages fluctuates over time, tool
1421
+ * <p>Note that measuring max used memory usages fluctuates over time, tool
1414
1422
* implementation, used hardware, etc.</p>
1415
1423
*
1416
- * @return maximum memory statistics
1424
+ * @return maximum used memory statistics
1417
1425
*/
1418
- public MaxMemoryStats getMaxMemoryStats () {
1419
- return maxmemorystats ;
1426
+ public MaxUsedMemoryStats getMaxUsedMemoryStats () {
1427
+ return maxusedmemorystats ;
1420
1428
}
1421
1429
1422
1430
/**
1423
- * Stores continuously statistics about the memory usage and BDD operations.
1431
+ * Stores continuously statistics about the BDD nodes usage and BDD operations,
1432
+ * where BDD operations is a proxy for time.
1424
1433
*
1425
1434
* @author mgoorden
1426
1435
*/
1427
1436
public static class ContinuousStats {
1428
1437
protected boolean enabled = false ;
1429
1438
protected List <Integer > contUsedBddNodes = new ArrayList <Integer >();
1430
- protected List <Long > contUsedOperations = new ArrayList <Long >();
1439
+ protected List <Long > contOperations = new ArrayList <Long >();
1431
1440
1432
1441
protected ContinuousStats () { }
1433
1442
1434
1443
public void enableMeasurements () {
1435
1444
enabled = true ;
1436
1445
}
1437
1446
1447
+ public void disableMeasurements () {
1448
+ enabled = false ;
1449
+ }
1450
+
1438
1451
public List <Integer > getNodesStats () {
1439
- if (contUsedBddNodes .size () != contUsedOperations .size ()) {
1452
+ if (contUsedBddNodes .size () != contOperations .size ()) {
1440
1453
throw new AssertionError ("Incorrect data collection." );
1441
1454
}
1442
1455
return contUsedBddNodes ;
1443
1456
}
1444
1457
1445
1458
public List <Long > getOperationsStats () {
1446
- if (contUsedBddNodes .size () != contUsedOperations .size ()) {
1459
+ if (contUsedBddNodes .size () != contOperations .size ()) {
1447
1460
throw new AssertionError ("Incorrect data collection." );
1448
1461
}
1449
- return contUsedOperations ;
1462
+ return contOperations ;
1450
1463
}
1451
1464
}
1452
1465
0 commit comments