Class MemoryLogger
- java.lang.Object
-
- org.processmining.plugins.workshop.Yaguang.ca.MemoryLogger
-
public class MemoryLogger extends java.lang.ObjectThis class is used to record the maximum memory usaged of an algorithm during a given execution. It is implemented by using the "singleton" design pattern.
-
-
Constructor Summary
Constructors Constructor Description MemoryLogger()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckMemory()Check the current memory usage and record it if it is higher than the amount of memory previously recorded.static MemoryLoggergetInstance()Method to obtain the only instance of this classdoublegetMaxMemory()To get the maximum amount of memory used until nowvoidreset()Reset the maximum amount of memory recorded.
-
-
-
Method Detail
-
getInstance
public static MemoryLogger getInstance()
Method to obtain the only instance of this class- Returns:
- instance of MemoryLogger
-
getMaxMemory
public double getMaxMemory()
To get the maximum amount of memory used until now- Returns:
- a double value indicating memory as megabytes
-
reset
public void reset()
Reset the maximum amount of memory recorded.
-
checkMemory
public void checkMemory()
Check the current memory usage and record it if it is higher than the amount of memory previously recorded.
-
-