ariba.util.core
Class PerformanceCheck

java.lang.Object
  extended by ariba.util.core.PerformanceCheck

public class PerformanceCheck
extends java.lang.Object

PerformanceCheck defines a set of expected performance boundaries for task execution. The PerformanceCheck is initialed with a list of PerformanceChecker objects associated with a PerformanceState metric (e.g. Metric_AQLQueries, Metric_PageGeneration, ...). The warning and the error thresholds used by the check are defined in the Parameters.table.

The expected pattern is that a PerformanceCheck instance is initialized (On startup) and remains immutable there after. It is then assigned to threads as requests are processed, via

    PerformanceState.watchPerformance(Checker)

For an example of use, see AWDispatcherServlet and BaseUIApplication.defaultPerformanceCheck()

The applied PerformanceCheck is currently applied in two ways: 1) In production, the errorRuntimeMillis is monitored by the PerformanceState.WatcherDaemon to trigger error logging of run away thread. 2) At dev time, the AWDebugPane displays warning and error metrics as the developer navigates page to page in the app -- to flag problemmatic areas.


Nested Class Summary
static interface PerformanceCheck.ErrorSink
          Callback interface for to record warnings/erros detected.
 
Field Summary
static int SeverityError
           
static int SeverityNone
           
static int SeverityWarning
           
 
Constructor Summary
PerformanceCheck(long warningRuntimeMillis, long errorRuntimeMillis, Parameters params)
           
 
Method Summary
 void addChecker(PerformanceChecker check)
           
 int checkAndRecord(PerformanceState.Stats stats, PerformanceCheck.ErrorSink sink)
           
 java.util.Map getCheckers()
           
static PerformanceCheck getPerformanceCheck(java.lang.String name, Parameters params)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SeverityNone

public static final int SeverityNone
See Also:
Constant Field Values

SeverityWarning

public static final int SeverityWarning
See Also:
Constant Field Values

SeverityError

public static final int SeverityError
See Also:
Constant Field Values
Constructor Detail

PerformanceCheck

public PerformanceCheck(long warningRuntimeMillis,
                        long errorRuntimeMillis,
                        Parameters params)
Method Detail

getPerformanceCheck

public static final PerformanceCheck getPerformanceCheck(java.lang.String name,
                                                         Parameters params)

addChecker

public void addChecker(PerformanceChecker check)

getCheckers

public java.util.Map getCheckers()

checkAndRecord

public int checkAndRecord(PerformanceState.Stats stats,
                          PerformanceCheck.ErrorSink sink)


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.