Package com.atlassian.util.profiling
Class ProfilerConfiguration
java.lang.Object
com.atlassian.util.profiling.ProfilerConfiguration
Configuration that applies to
ProfilerStrategy- Since:
- 3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintlonggetMinFrameTime(TimeUnit timeUnit) longgetMinTraceTime(TimeUnit timeUnit) booleanbooleanvoidsetEnabled(boolean value) voidsetMaxFrameNameLength(int value) voidsetMaxFramesPerTrace(int value) voidsetMemoryProfilingEnabled(boolean value) voidsetMinFrameTime(long value, TimeUnit timeUnit) voidsetMinTraceTime(long value, TimeUnit timeUnit)
-
Constructor Details
-
ProfilerConfiguration
public ProfilerConfiguration()
-
-
Method Details
-
enableForThread
- Returns:
- a ticker that can be closed to end the temporary enabling of profiling on the current thread
-
getMaxFramesPerTrace
public int getMaxFramesPerTrace()- Returns:
- the maximum number of frames to include in a profiling trace
-
getMaxFrameNameLength
public int getMaxFrameNameLength()- Returns:
- the maximum number of characters in a profiling frame name. Longer names will be truncated.
-
getMinFrameTime
- Parameters:
timeUnit- the requested time unit- Returns:
- the minimum time a frame should take to be included in a profiling trace. Frames that take less than this amount of time will be suppressed from the trace.
-
getMinTraceTime
- Parameters:
timeUnit- the requested time unit- Returns:
- the minimum time a profiling trace should take. Traces that take less than this amount of time will be pruned from profiling output.
-
isEnabled
public boolean isEnabled()- Returns:
- whether profiling is enabled
-
isMemoryProfilingEnabled
public boolean isMemoryProfilingEnabled()- Returns:
- whether profiling should include memory usage
-
setEnabled
public void setEnabled(boolean value) - Parameters:
value- whether profiling should be enabled
-
setMaxFramesPerTrace
public void setMaxFramesPerTrace(int value) - Parameters:
value- the maximum number of frames to include in a profiling trace
-
setMaxFrameNameLength
public void setMaxFrameNameLength(int value) - Parameters:
value- the maximum number of characters in a profiling frame name. Longer names will be truncated.
-
setMemoryProfilingEnabled
public void setMemoryProfilingEnabled(boolean value) - Parameters:
value- whether profiling should include memory usage
-
setMinFrameTime
- Parameters:
value- the minimum time a profiling trace should take. Traces that take less than this amount of time will be pruned from profiling output.timeUnit- the time unit ofvalue
-
setMinTraceTime
- Parameters:
value- the minimum time a profiling trace should take. Traces that take less than this amount of time will be pruned from profiling output.timeUnit- the time unit ofvalue
-