HPSearch

cgl.hpsearch.shell.narada
Class PerfMetrics

java.lang.Object
  extended byorg.mozilla.javascript.ScriptableObject
      extended bycgl.hpsearch.shell.narada.PerfMetrics
All Implemented Interfaces:
Scriptable, Serializable

public class PerfMetrics
extends ScriptableObject

Rhino host object that serves as an interface to the NB - Performance monitoring service.

Author:
Harshawardhan Gadgil $date Created on Apr 6, 2004$
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
DONTENUM, EMPTY, parent, PERMANENT, prototype, READONLY
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
PerfMetrics()
           
 
Method Summary
 String getClassName()
           
 void jsConstructor()
           
static Object jsFunction_getLinks(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Returns the link id's collected at a particular aggregation node
Note: The parameters below are Rhino Javascript semantics.
static Object jsFunction_getNodes(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Returns a String array of various aggregation nodes in the network
static void jsFunction_printTree(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Debugging purposes only.
static Object jsFunction_query(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Runs an XPath query against the collected statistics.
static void jsFunction_startMonitoring(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Signals the NB-Performance monitor to start monitoring(listening for performance events on the topic defined by NB_PERFORMANCE_DATA_TOPIC)
static void jsFunction_stopMonitoring(Context _cx, Scriptable _thisObj, Object[] id, Function funObj)
          Signals the NB-Performance monitor to stop monitoring(listening for performance events on the topic defined by NB_PERFORMANCE_DATA_TOPIC)
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, getAllIds, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, has, has, hasInstance, hasProperty, hasProperty, isSealed, put, put, putProperty, putProperty, sealObject, setAttributes, setAttributes, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerfMetrics

public PerfMetrics()
Method Detail

jsConstructor

public void jsConstructor()

getClassName

public String getClassName()

jsFunction_startMonitoring

public static void jsFunction_startMonitoring(Context _cx,
                                              Scriptable _thisObj,
                                              Object[] id,
                                              Function funObj)
Signals the NB-Performance monitor to start monitoring(listening for performance events on the topic defined by NB_PERFORMANCE_DATA_TOPIC)

Parameters:
_cx -
_thisObj -
id -
funObj -

jsFunction_stopMonitoring

public static void jsFunction_stopMonitoring(Context _cx,
                                             Scriptable _thisObj,
                                             Object[] id,
                                             Function funObj)
Signals the NB-Performance monitor to stop monitoring(listening for performance events on the topic defined by NB_PERFORMANCE_DATA_TOPIC)

Parameters:
_cx -
_thisObj -
id -
funObj -

jsFunction_printTree

public static void jsFunction_printTree(Context _cx,
                                        Scriptable _thisObj,
                                        Object[] id,
                                        Function funObj)
Debugging purposes only. Shows the pretty printed XML of the collected statistics. This represents only the last update.

Parameters:
_cx -
_thisObj -
id -
funObj -

jsFunction_getNodes

public static Object jsFunction_getNodes(Context _cx,
                                         Scriptable _thisObj,
                                         Object[] id,
                                         Function funObj)
Returns a String array of various aggregation nodes in the network

Parameters:
_cx -
_thisObj -
id -
funObj -
Returns:
Array of strings containing the aggregation nodes

jsFunction_getLinks

public static Object jsFunction_getLinks(Context _cx,
                                         Scriptable _thisObj,
                                         Object[] id,
                                         Function funObj)
Returns the link id's collected at a particular aggregation node
Note: The parameters below are Rhino Javascript semantics.

Parameters:
_cx -
_thisObj -
id - - Pass a parameter containing the id of the aggregation node.
funObj -
Returns:
Array of string containing the various links in the network

jsFunction_query

public static Object jsFunction_query(Context _cx,
                                      Scriptable _thisObj,
                                      Object[] id,
                                      Function funObj)
Runs an XPath query against the collected statistics.
Note: The parameters below are Rhino Javascript semantics.
Example:
 badLink = PerfMetrics.query("//link[avgLatency > 5.0]/@id");
 jitter = PerfMetrics.query("//link[@id='" + badLink[0] + "']/jitter");
 

Parameters:
_cx -
_thisObj -
id - - A string containing the XPath query.
funObj -
Returns:
An array of strings representing the matching nodes of the query.

HPSearch

For comments and suggestions please send e-mail to Harshawardhan Gadgil
Last updated: June 9 2006