public final class Profile extends Object
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Method and Description |
---|---|
static void |
end()
Ends timing on the calling class and method, specified by line number (of the start command).
|
static void |
end(String name)
Ends timing on the calling class and method, specified by given name.
|
static void |
print()
Prints profiling output to the console once every 1s or longer, or according to the time set in
setPrintInterval() . |
static void |
setPrintInterval(long printInterval)
Sets a print interval.
|
static void |
start()
Starts timing on the calling class and method, specified by line number.
|
static void |
start(String name)
Starts timing on the calling class and method, specified by given name.
|
static String |
statistics()
Returns a formatted string of a table with statistics.
|
public static void start()
public static void start(String name)
name
- String; namepublic static void end()
public static void end(String name)
name
- String; namepublic static String statistics()
public static void print()
setPrintInterval()
. This method needs to be called repeatedly, and will only print again after the print
interval. If execution time between two call to this method is longer than the print interval, this method prints
directly.public static void setPrintInterval(long printInterval)
printInterval
- long; print interval in msCopyright © 2014–2018 Delft University of Technology. All rights reserved.