com.atlassian.util.profiling
Class UtilTimerStack

java.lang.Object
  extended by com.atlassian.util.profiling.UtilTimerStack

public class UtilTimerStack
extends java.lang.Object

A timer stack.

Usage:

 String logMessage = "Log message";
 UtilTimerStack.push(logMessage);
 try
 {
   //do some code
 }
 finally
 {
   UtilTimerStack.pop(logMessage); //this needs to be the same text as above
 }
 


Field Summary
static java.lang.String ACTIVATE_MEMORY_PROPERTY
          System property that specifies by default whether memory should be profiled or not.
static java.lang.String ACTIVATE_PROPERTY
          System property that specifies by default whether this timer should be used or not.
static java.lang.String MIN_TIME
          System property that controls the default threshold time below which a profiled event should not be reported
static java.lang.String MIN_TOTAL_TIME
          System property that controls the default threshold time below which an entire stack of profiled events should not be reported.
 
Constructor Summary
UtilTimerStack()
           
 
Method Summary
static boolean isActive()
           
static boolean isProfileMemory()
           
static void pop(java.lang.String name)
           
static void push(java.lang.String name)
           
static void setActive(boolean active)
           
static void setLogger(UtilTimerLogger logger)
           
static void setMinTime(long minTime)
           
static void setMinTotalTime(long minTotalTime)
           
static void setProfileMemory(boolean active)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTIVATE_PROPERTY

public static final java.lang.String ACTIVATE_PROPERTY
System property that specifies by default whether this timer should be used or not. Set to "true" activates the timer. Set to "false" to deactivate.

See Also:
Constant Field Values

ACTIVATE_MEMORY_PROPERTY

public static final java.lang.String ACTIVATE_MEMORY_PROPERTY
System property that specifies by default whether memory should be profiled or not. Set to "true" activates the timer. Set to "false" to deactivate.

See Also:
Constant Field Values

MIN_TIME

public static final java.lang.String MIN_TIME
System property that controls the default threshold time below which a profiled event should not be reported

See Also:
Constant Field Values

MIN_TOTAL_TIME

public static final java.lang.String MIN_TOTAL_TIME
System property that controls the default threshold time below which an entire stack of profiled events should not be reported.

See Also:
Constant Field Values
Constructor Detail

UtilTimerStack

public UtilTimerStack()
Method Detail

push

public static void push(java.lang.String name)

pop

public static void pop(java.lang.String name)

isActive

public static boolean isActive()

setMinTime

public static void setMinTime(long minTime)

setMinTotalTime

public static void setMinTotalTime(long minTotalTime)

isProfileMemory

public static boolean isProfileMemory()

setActive

public static void setActive(boolean active)

setProfileMemory

public static void setProfileMemory(boolean active)

setLogger

public static void setLogger(UtilTimerLogger logger)


Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.