Package ubic.gemma.core.profiling
Class StopWatchUtils
java.lang.Object
ubic.gemma.core.profiling.StopWatchUtils
Utilities for working with
StopWatch
.- Author:
- poirigui
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getMinutesElapsed
(org.apache.commons.lang3.time.StopWatch overallWatch) measuredRegion
(org.apache.commons.lang3.time.StopWatch stopWatch) Create a measured region by aStopWatch
, which can be used with a try-with-resource statement toStopWatch.start()
andStopWatch.suspend()
when entering and leaving the region.
-
Constructor Details
-
StopWatchUtils
public StopWatchUtils()
-
-
Method Details
-
measuredRegion
public static StopWatchUtils.StopWatchRegion measuredRegion(org.apache.commons.lang3.time.StopWatch stopWatch) Create a measured region by aStopWatch
, which can be used with a try-with-resource statement toStopWatch.start()
andStopWatch.suspend()
when entering and leaving the region. If the stop watch is suspended, let's say from a previous call to this function, it will be resumed, allowing for a cumulative measurement of time usage. This is really handy to measure code regions and report time usage. -
getMinutesElapsed
-