public interface TimingsFactory
Timings
.Modifier and Type | Method and Description |
---|---|
void |
generateReport(CommandSource source)
Generates a report and sends to the given source.
|
void |
generateReport(MessageChannel channel)
Generates a report and sends to the given channel.
|
int |
getHistoryInterval()
Gets the history interval.
|
int |
getHistoryLength()
Gets the history length.
|
boolean |
isTimingsEnabled()
Gets whether the timing system is enabled.
|
boolean |
isVerboseTimingsEnabled()
Gets whether verbose mode is enabled.
|
Timing |
of(Object plugin,
String name,
Timing groupHandler)
Gets or creates a timing instance for the plugin with the given name.
|
void |
reset()
Resets the timing data.
|
void |
setHistoryInterval(int interval)
Sets the history interval.
|
void |
setHistoryLength(int length)
Sets the history length.
|
void |
setTimingsEnabled(boolean enabled)
Sets whether the timing system is enabled.
|
void |
setVerboseTimingsEnabled(boolean enabled)
Sets whether verbose mode is enabled.
|
Timing of(Object plugin, String name, @Nullable Timing groupHandler)
plugin
- Plugin owning the timingname
- Name of the timinggroupHandler
- The handler, can be null for no parentboolean isTimingsEnabled()
void setTimingsEnabled(boolean enabled)
enabled
- Is enabled or notboolean isVerboseTimingsEnabled()
void setVerboseTimingsEnabled(boolean enabled)
enabled
- Is enabledint getHistoryInterval()
void setHistoryInterval(int interval)
interval
- The interval in ticksint getHistoryLength()
void setHistoryLength(int length)
length
- History lengthvoid reset()
void generateReport(@Nullable CommandSource source)
source
- Source to send to, null for console sourcevoid generateReport(MessageChannel channel)
channel
- Channel to send to