Class PerformanceLogger
java.lang.Object
edu.internet2.middleware.grouper.util.PerformanceLogger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringuse this for performance log label for sql queries -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.commons.logging.Logget a reference to this logger so the log config happens in one placestatic voidperformanceTimingAllDuration(String key, long durationNanos) add a performance gate for all performance timers, for a duration from start to finish.static voidperformanceTimingData(String label, String key, Object value) add a performance gatestatic voidperformanceTimingDataRemoveKey(String label, String key) add a performance gatestatic Stringperformance stringstatic voidperformanceTimingDelete(String label) add a performance timerstatic voidperformanceTimingDuration(String label, String key, long durationNanos) add a performance gate for a duration from start to finish.static booleanperformanceTimingEnabled(String label) see if enabledstatic voidperformanceTimingGate(String label, String key) add a performance gate.static voidperformanceTimingStart(String label, boolean multiThreaded) add a performance timer
-
Field Details
-
PERFORMANCE_LOG_LABEL_SQL
use this for performance log label for sql queries- See Also:
-
-
Constructor Details
-
PerformanceLogger
public PerformanceLogger()
-
-
Method Details
-
performanceLog
public static org.apache.commons.logging.Log performanceLog()get a reference to this logger so the log config happens in one place- Returns:
- the logger
-
performanceTimingStart
add a performance timer- Parameters:
label- in config and refer to thismultiThreaded-
-
performanceTimingDelete
add a performance timer- Parameters:
label- in config and refer to this
-
performanceTimingGate
add a performance gate. This measures from start until now, not a duration- Parameters:
key- something that will end up having ElapsedMs on end
-
performanceTimingAllDuration
add a performance gate for all performance timers, for a duration from start to finish. Cannot overlap. Will count all and keep a count if more than 1- Parameters:
key- something that will end up having _durationMs on enddurationNanos-
-
performanceTimingDuration
add a performance gate for a duration from start to finish. Cannot overlap. Will count all and keep a count if more than 1- Parameters:
durationNanos- something that will end up having ElapsedMs on end
-
performanceTimingData
add a performance gate- Parameters:
key-value-
-
performanceTimingEnabled
see if enabled- Parameters:
label-- Returns:
- ture if enabled
-
performanceTimingDataRemoveKey
add a performance gate- Parameters:
key-value-
-
performanceTimingDataResult
performance string- Parameters:
label-
-