Package com.opencloud.sentinel.util
Class ElapsedTime
- java.lang.Object
-
- com.opencloud.sentinel.util.ElapsedTime
-
public class ElapsedTime extends java.lang.Object
Simple elapsed time class for logging time elapsed from creation date.
-
-
Constructor Summary
Constructors Constructor Description ElapsedTime()
Creates newElapsedTime
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getElapsedTimeSinceCreation()
Returns the elapsed time since creationlong
getHeapMaxChangeSinceCreation()
Returns the maximum heap size since creation.long
getHeapUsedChangeSinceCreation()
Returns the heap used since creation.java.lang.management.MemoryUsage
getStartHeap()
Returns the creation Heaplong
getStartTimeInMillis()
Returns the creation start timejava.lang.String
toString()
-
-
-
Constructor Detail
-
ElapsedTime
public ElapsedTime()
Creates newElapsedTime
instance.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getElapsedTimeSinceCreation
public long getElapsedTimeSinceCreation()
Returns the elapsed time since creation- Returns:
- elapsed time since creation in milliseconds.
-
getStartTimeInMillis
public long getStartTimeInMillis()
Returns the creation start time- Returns:
- creation time in milliseconds.
-
getStartHeap
public java.lang.management.MemoryUsage getStartHeap()
Returns the creation Heap- Returns:
- creation heap.
-
getHeapMaxChangeSinceCreation
public long getHeapMaxChangeSinceCreation()
Returns the maximum heap size since creation.- Returns:
- maximum heap in bytes.
-
getHeapUsedChangeSinceCreation
public long getHeapUsedChangeSinceCreation()
Returns the heap used since creation.- Returns:
- heap useds in bytes.
-
-