Package org.serviceconnector.log
Class PerformanceLogger
java.lang.Object
org.serviceconnector.log.PerformanceLogger
The Class PerformanceLogger.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidBegin.static voidBegin.static voidEnd.static voidendThreadBound(String key) End.static booleanChecks if is enabled.
-
Method Details
-
isEnabled
public static boolean isEnabled()Checks if is enabled.- Returns:
- true, if is enabled
-
beginThreadBound
public static void beginThreadBound()Begin. Makes performance logger active. The method end stops the measuring and logs the result. Be careful its only working within the same thread. -
endThreadBound
End. Stops current active performance logger and logs the result. Be careful its only working within the same thread.- Parameters:
key- the key
-
begin
Begin. Makes performance logger active. The method end stops the measuring and logs the result. Be careful begin/end is not thread safe. Coordinating begin and end must be done by the user of the PerformanceLogger. Use key to identify performanceItem.- Parameters:
key- the key
-
end
End. Stops current active performance logger and logs the result. Be careful begin/end is not thread safe. Coordinating begin and end must be done by the user of the PerformanceLogger. Use key to identify performanceItem.- Parameters:
key- the key
-