Package co.aikar.timings
Class Timings
java.lang.Object
co.aikar.timings.Timings
Deprecated, for removal: This API element is subject to removal in a future version.
Timings will likely be replaced with Spark in the future
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final TimingDeprecated, for removal: This API element is subject to removal in a future version.
- 
Method SummaryModifier and TypeMethodDescriptionstatic ComponentDeprecated, for removal: This API element is subject to removal in a future version.static voidDeprecated, for removal: This API element is subject to removal in a future version.Generates a report and sends it to the specified listener.static voidgenerateReport(@Nullable CommandSender sender) Deprecated, for removal: This API element is subject to removal in a future version.Generates a report and sends it to the specified command sender.static intDeprecated, for removal: This API element is subject to removal in a future version.Gets the interval between Timing History report generation.static intDeprecated, for removal: This API element is subject to removal in a future version.Gets how long in ticks Timings history is kept for the server.static booleanDeprecated, for removal: This API element is subject to removal in a future version.Gets whether or not the Spigot Timings system is enabledstatic booleanDeprecated, for removal: This API element is subject to removal in a future version.Sets whether or not the Timings should monitor at Verbose level.Deprecated, for removal: This API element is subject to removal in a future version.Returns a Timing for a plugin corresponding to a name.Deprecated, for removal: This API element is subject to removal in a future version.Returns a handler that has a groupHandler timer handler.Deprecated, for removal: This API element is subject to removal in a future version.Returns a Timing object after starting it, useful for Java7 try-with-resources.Deprecated, for removal: This API element is subject to removal in a future version.Returns a Timing object after starting it, useful for Java7 try-with-resources.static voidreset()Deprecated, for removal: This API element is subject to removal in a future version.Resets all Timing Datastatic voidsetHistoryInterval(int interval) Deprecated, for removal: This API element is subject to removal in a future version.Sets the interval between Timing History report generations.static voidsetHistoryLength(int length) Deprecated, for removal: This API element is subject to removal in a future version.Sets how long Timing History reports are kept for the server.static voidsetTimingsEnabled(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether or not the Spigot Timings system should be enabledstatic voidsetVerboseTimingsEnabled(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether or not the Timings should monitor at Verbose level.
- 
Field Details- 
NULL_HANDLERDeprecated, for removal: This API element is subject to removal in a future version.
 
- 
- 
Method Details- 
of@NotNull public static @NotNull Timing of(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name) Deprecated, for removal: This API element is subject to removal in a future version.Returns a Timing for a plugin corresponding to a name.- Parameters:
- plugin- Plugin to own the Timing
- name- Name of Timing
- Returns:
- Handler
 
- 
of@NotNull public static @NotNull Timing of(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, @Nullable @Nullable Timing groupHandler) Deprecated, for removal: This API element is subject to removal in a future version.Returns a handler that has a groupHandler timer handler. Parent timers should not have their start/stop methods called directly, as the children will call it for you. Parent Timers are used to group multiple subsections together and get a summary of them combined Parent Handler can not be changed after first call- Parameters:
- plugin- Plugin to own the Timing
- name- Name of Timing
- groupHandler- Parent handler to mirror .start/stop calls to
- Returns:
- Timing Handler
 
- 
ofStart@NotNull public static @NotNull Timing ofStart(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name) Deprecated, for removal: This API element is subject to removal in a future version.Returns a Timing object after starting it, useful for Java7 try-with-resources. try (Timing ignored = Timings.ofStart(plugin, someName)) { // timed section }- Parameters:
- plugin- Plugin to own the Timing
- name- Name of Timing
- Returns:
- Timing Handler
 
- 
ofStart@NotNull public static @NotNull Timing ofStart(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String name, @Nullable @Nullable Timing groupHandler) Deprecated, for removal: This API element is subject to removal in a future version.Returns a Timing object after starting it, useful for Java7 try-with-resources. try (Timing ignored = Timings.ofStart(plugin, someName, groupHandler)) { // timed section }- Parameters:
- plugin- Plugin to own the Timing
- name- Name of Timing
- groupHandler- Parent handler to mirror .start/stop calls to
- Returns:
- Timing Handler
 
- 
isTimingsEnabledpublic static boolean isTimingsEnabled()Deprecated, for removal: This API element is subject to removal in a future version.Gets whether or not the Spigot Timings system is enabled- Returns:
- Enabled or not
 
- 
setTimingsEnabledpublic static void setTimingsEnabled(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether or not the Spigot Timings system should be enabled Calling this will reset timing data.- Parameters:
- enabled- Should timings be reported
 
- 
deprecationMessageDeprecated, for removal: This API element is subject to removal in a future version.
- 
isVerboseTimingsEnabledpublic static boolean isVerboseTimingsEnabled()Deprecated, for removal: This API element is subject to removal in a future version.Sets whether or not the Timings should monitor at Verbose level. When Verbose is disabled, high-frequency timings will not be available. - Returns:
- Enabled or not
 
- 
setVerboseTimingsEnabledpublic static void setVerboseTimingsEnabled(boolean enabled) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether or not the Timings should monitor at Verbose level. When Verbose is disabled, high-frequency timings will not be available. Calling this will reset timing data.- Parameters:
- enabled- Should high-frequency timings be reported
 
- 
getHistoryIntervalpublic static int getHistoryInterval()Deprecated, for removal: This API element is subject to removal in a future version.Gets the interval between Timing History report generation. Defaults to 5 minutes (6000 ticks)- Returns:
- Interval in ticks
 
- 
setHistoryIntervalpublic static void setHistoryInterval(int interval) Deprecated, for removal: This API element is subject to removal in a future version.Sets the interval between Timing History report generations. Defaults to 5 minutes (6000 ticks) This will recheck your history length, so lowering this value will lower your history length if you need more than 60 history windows.- Parameters:
- interval- Interval in ticks
 
- 
getHistoryLengthpublic static int getHistoryLength()Deprecated, for removal: This API element is subject to removal in a future version.Gets how long in ticks Timings history is kept for the server. Defaults to 1 hour (72000 ticks)- Returns:
- Duration in Ticks
 
- 
setHistoryLengthpublic static void setHistoryLength(int length) Deprecated, for removal: This API element is subject to removal in a future version.Sets how long Timing History reports are kept for the server. Defaults to 1 hours(72000 ticks) This value is capped at a maximum of getHistoryInterval() * MAX_HISTORY_FRAMES (12) Will not reset Timing Data but may truncate old history if the new length is less than old length.- Parameters:
- length- Duration in ticks
 
- 
resetpublic static void reset()Deprecated, for removal: This API element is subject to removal in a future version.Resets all Timing Data
- 
generateReportDeprecated, for removal: This API element is subject to removal in a future version.Generates a report and sends it to the specified command sender. If sender is null, ConsoleCommandSender will be used.- Parameters:
- sender- The sender to send to, or null to use the ConsoleCommandSender
 
- 
generateReportDeprecated, for removal: This API element is subject to removal in a future version.Generates a report and sends it to the specified listener. Use withBufferedCommandSenderto get full response when done!- Parameters:
- sender- The listener to send responses too.
 
 
-