|
MOEA Framework 2.12 API Specification |
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.moeaframework.util.Timing
public class Timing
Tool to simplify manually collecting timing information. Timers with different names can be interleaved or nested, but two timers with the same name can not exist simultaneously - the first timer with the shared name must be stopped before the second is started.
for (int i=0; i<N; i++) {
Timing.startTimer("foo");
...code for which we are collecting timing information...
Timing.stopTimer("foo");
}
Method Summary | |
---|---|
static void |
clear()
Clears all timing data. |
static org.apache.commons.math3.stat.descriptive.SummaryStatistics |
getStatistics(String name)
Returns the accumulated timing statistics for the timer with the specified name; or null if no such timer exists. |
static void |
printMagnitudes()
Prints the relative magnitudes of the collected timer data to the standard output stream. |
static void |
printMagnitudes(PrintStream out)
Prints the relative magnitudes of the collected timer data to the specified PrintStream . |
static void |
printStatistics()
Prints the collected timer data to the standard output stream. |
static void |
printStatistics(PrintStream out)
Prints the collected timer data to the specified PrintStream . |
static void |
startTimer(String name)
Starts a timer with the specified name. |
static void |
stopTimer(String name)
Stops the timer with the specified name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void startTimer(String name)
name
- the name of the timer to startpublic static void stopTimer(String name)
name
- the name of the timer to stoppublic static org.apache.commons.math3.stat.descriptive.SummaryStatistics getStatistics(String name)
null
if no such timer exists.
name
- the name of the timer
null
if no such timer existspublic static void printStatistics()
public static void printStatistics(PrintStream out)
PrintStream
.
out
- the stream to which data is printedpublic static void printMagnitudes()
public static void printMagnitudes(PrintStream out)
PrintStream
.
out
- the stream to which data is printedpublic static void clear()
|
MOEA Framework 2.12 API Specification |
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |