Package de.learnlib.util.statistic
Class SimpleProfiler
- java.lang.Object
-
- de.learnlib.util.statistic.SimpleProfiler
-
public final class SimpleProfiler extends Object
Very rudimentary profiler.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable Counter
cumulated(String name)
Return the counter for the cumulated (passed) time of the given timer.static void
logResults()
Log results in category PROFILING.static void
reset()
Reset internal data.static void
start(String name)
Start the timer identified by the given key.static void
stop(String name)
Stop the timer identified by the given key.
-
-
-
Method Detail
-
reset
public static void reset()
Reset internal data.
-
start
public static void start(String name)
Start the timer identified by the given key.- Parameters:
name
- The name of the timer to be started.
-
stop
public static void stop(String name)
Stop the timer identified by the given key. After stopping a timer, the time passed from itsinitialization
will be added to the cumulated time of the specific timer.- Parameters:
name
- The name of the timer to be stopped.
-
cumulated
public static @Nullable Counter cumulated(String name)
Return the counter for the cumulated (passed) time of the given timer.- Parameters:
name
- The name of the timer to be returned.- Returns:
- The counter for tracking the passed milliseconds of the timer
-
logResults
public static void logResults()
Log results in category PROFILING.
-
-