Skip to content

Commit

Permalink
Signatures of memory consumption methods fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
avitorovic committed May 6, 2016
1 parent e26211e commit 70ebfc6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,9 @@ protected void printStatistics(int type) {
+ ", Total:,"
+ totalSize
+ ", Memory used: ,"
+ StatisticsUtilities.bytesToMegabytes(memory)
+ StatisticsUtilities.bytesToKBs(memory)
+ ","
+ StatisticsUtilities.bytesToMegabytes(runtime
+ StatisticsUtilities.bytesToKBs(runtime
.totalMemory()));
else if (type == SystemParameters.INPUT_PRINT)
LOG.info(","
Expand All @@ -448,9 +448,9 @@ else if (type == SystemParameters.INPUT_PRINT)
+ ", Total:,"
+ totalSize
+ ", Memory used: ,"
+ StatisticsUtilities.bytesToMegabytes(memory)
+ StatisticsUtilities.bytesToKBs(memory)
+ ","
+ StatisticsUtilities.bytesToMegabytes(runtime
+ StatisticsUtilities.bytesToKBs(runtime
.totalMemory()));
else if (type == SystemParameters.OUTPUT_PRINT)
LOG.info("," + "RESULT," + _thisTaskID + ","
Expand All @@ -474,9 +474,9 @@ else if (type == SystemParameters.FINAL_PRINT) {
+ ", Total:,"
+ totalSize
+ ", Memory used: ,"
+ StatisticsUtilities.bytesToMegabytes(memory)
+ StatisticsUtilities.bytesToKBs(memory)
+ ","
+ StatisticsUtilities.bytesToMegabytes(runtime
+ StatisticsUtilities.bytesToKBs(runtime
.totalMemory()));
LOG.info("," + "RESULT," + _thisTaskID + ","
+ "TimeStamp:," + ts + ",Sent Tuples,"
Expand Down Expand Up @@ -505,9 +505,9 @@ else if (type == SystemParameters.FINAL_PRINT) {
+ ", Total:,"
+ totalSize
+ ", Memory used: ,"
+ StatisticsUtilities.bytesToMegabytes(memory)
+ StatisticsUtilities.bytesToKBs(memory)
+ ","
+ StatisticsUtilities.bytesToMegabytes(runtime
+ StatisticsUtilities.bytesToKBs(runtime
.totalMemory()));
LOG.info("," + "RESULT," + _thisTaskID + ","
+ "TimeStamp:," + ts + ",Sent Tuples,"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,9 @@ protected void printStatistics(int type, int size1, int size2, Logger LOG) {
+ ", Total:,"
+ totalSize
+ ", Memory used: ,"
+ StatisticsUtilities.bytesToMegabytes(memory)
+ StatisticsUtilities.bytesToKBs(memory)
+ ","
+ StatisticsUtilities.bytesToMegabytes(runtime
+ StatisticsUtilities.bytesToKBs(runtime
.totalMemory()));
else if (type == SystemParameters.INPUT_PRINT)
LOG.info(","
Expand All @@ -465,9 +465,9 @@ else if (type == SystemParameters.INPUT_PRINT)
+ ", Total:,"
+ totalSize
+ ", Memory used: ,"
+ StatisticsUtilities.bytesToMegabytes(memory)
+ StatisticsUtilities.bytesToKBs(memory)
+ ","
+ StatisticsUtilities.bytesToMegabytes(runtime
+ StatisticsUtilities.bytesToKBs(runtime
.totalMemory()));
else if (type == SystemParameters.OUTPUT_PRINT)
LOG.info("," + "RESULT," + _thisTaskID + ","
Expand All @@ -491,9 +491,9 @@ else if (type == SystemParameters.FINAL_PRINT) {
+ ", Total:,"
+ totalSize
+ ", Memory used: ,"
+ StatisticsUtilities.bytesToMegabytes(memory)
+ StatisticsUtilities.bytesToKBs(memory)
+ ","
+ StatisticsUtilities.bytesToMegabytes(runtime
+ StatisticsUtilities.bytesToKBs(runtime
.totalMemory()));
LOG.info("," + "RESULT," + _thisTaskID + ","
+ "TimeStamp:," + ts + ",Sent Tuples,"
Expand Down Expand Up @@ -522,9 +522,9 @@ else if (type == SystemParameters.FINAL_PRINT) {
+ ", Total:,"
+ totalSize
+ ", Memory used: ,"
+ StatisticsUtilities.bytesToMegabytes(memory)
+ StatisticsUtilities.bytesToKBs(memory)
+ ","
+ StatisticsUtilities.bytesToMegabytes(runtime
+ StatisticsUtilities.bytesToKBs(runtime
.totalMemory()));
LOG.info("," + "RESULT," + _thisTaskID + ","
+ "TimeStamp:," + ts + ",Sent Tuples,"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import ch.epfl.data.squall.utilities.SystemParameters;

public class StatisticsUtilities implements Serializable {
public static double bytesToMegabytes(long bytes) {
public static double bytesToKBs(long bytes) {
return bytes / 1024;
}

Expand Down Expand Up @@ -91,8 +91,8 @@ public void printInitialStats(Logger LOG, int thisTaskID,
+ ", Total:,"
+ (firstRelationSize + secondRelationSize
+ firstTaggedRelationSize + secondTaggedRelationSize)
+ ", Memory used: ," + bytesToMegabytes(memory) + ","
+ bytesToMegabytes(runtime.totalMemory()));
+ ", Memory used: ," + bytesToKBs(memory) + ","
+ bytesToKBs(runtime.totalMemory()));
}

public void printMemoryStats(int heirarchyPosition, Logger LOG,
Expand All @@ -117,9 +117,9 @@ public void printMemoryStats(int heirarchyPosition, Logger LOG,
+ ", Total:,"
+ (numberOfTuplesMemory)
+ ", Memory used: ,"
+ StatisticsUtilities.bytesToMegabytes(memory)
+ StatisticsUtilities.bytesToKBs(memory)
+ ","
+ StatisticsUtilities.bytesToMegabytes(runtime
+ StatisticsUtilities.bytesToKBs(runtime
.totalMemory()));
}
}
Expand Down

0 comments on commit 70ebfc6

Please sign in to comment.