Package org.apache.sysds.utils.stats
Class Timing
java.lang.Object
org.apache.sysds.utils.stats.Timing
Helper class to time the execution of elements
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstart()Starts the time measurement.doublestop()Measures and returns the time since the last start() or stop() invocation and restarts the measurement.voidMeasures and returns the time since the last start() or stop() invocation, restarts the measurement, and prints the last measurement to STDOUT.toString()
-
Constructor Details
-
Timing
public Timing()Get a timer that is started. -
Timing
public Timing(boolean start) Get a timing that is optionally started- Parameters:
start- If the timer should reset its time.
-
-
Method Details
-
start
public void start()Starts the time measurement. -
stop
public double stop()Measures and returns the time since the last start() or stop() invocation and restarts the measurement.- Returns:
- duration between start and stop
-
stopAndPrint
public void stopAndPrint()Measures and returns the time since the last start() or stop() invocation, restarts the measurement, and prints the last measurement to STDOUT. -
toString
-