示例#1
0
 /**
  * Return a timing monitor with units in milliseconds. stop() should be called on the returned
  * monitor to indicate the time that the process took. Note time monitors keep the starttime as an
  * instance variable and so every time you want to use a TimeMonitor you should get a new
  * instance. <b>Sample call:</b><br>
  *
  * <blockquote>
  *
  * <code><pre>
  *  Monitor mon=MonitorFactory.start("pageHits");<br>
  * ...code being timed...<br>
  * mon.stop();
  *
  * </pre></code>
  *
  * </blockquote>
  *
  * <br>
  * <br>
  */
 public static Monitor start(String label) {
   return factory.start(label);
 }
示例#2
0
 /** This returns an HTML report for basic data with no range info in the header. */
 public static String getReport() {
   return factory.getRootMonitor().getReport();
 }
示例#3
0
 public static void enableActivityTracking(boolean enable) {
   factory.enableActivityTracking(enable);
 }
示例#4
0
 public static boolean isGlobalActiveEnabled() {
   return factory.isGlobalActiveEnabled();
 }
示例#5
0
 /**
  * This returns the header for basic data with no range info in the header. This method is
  * deprecated. use the methods associated
  *
  * <p>with the CompositeMonitor. The various getXXXHeader() methods of CompositeMonitors can
  * return this information and more.
  */
 public static String[] getHeader() {
   return factory.getRootMonitor().getBasicHeader();
 }
示例#6
0
 /** Remove/delete the specified monitor */
 public static void remove(String label, String units) {
   factory.remove(label, units);
 }
示例#7
0
 /**
  * Use the specified map to hold the monitors. This map should be threadsafe. This allows for the
  * use of a faster map than
  *
  * <p>the default synchronzied HashMap()
  */
 public static void setMap(Map map) {
   factory.setMap(map);
 }
示例#8
0
 /**
  * Return the monitor associated with the label, and units. All statistics associated with the
  * monitor can then be accessed such as hits, total, avg, min, and max. If the monitor does not
  * exist it will be created. <b>Sample call:</b><br>
  *
  * <blockquote>
  *
  * <code><pre>
  *  Monitor mon=MonitorFactory.getMonitor("myPrimaryMonitor");<br>
  *
  * </pre></code>
  *
  * </blockquote>
  *
  * <br>
  * <br>
  */
 public static Monitor getMonitor(String label, String units) {
   return factory.getMonitor(label, units);
 }
示例#9
0
 /**
  * Return the time monitor associated with the label. All statistics associated with the monitor
  * can then be accessed such as hits, total, avg, min, and max. If the monitor does not exist it
  * will be created. <b>Sample call:</b><br>
  *
  * <blockquote>
  *
  * <code><pre>
  *  Monitor mon=MonitorFactory.getTimeMonitor("myPrimaryMonitor");<br>
  *
  * </pre></code>
  *
  * </blockquote>
  *
  * <br>
  * <br>
  */
 public static Monitor getTimeMonitor(String label) {
   return factory.getTimeMonitor(label);
 }
示例#10
0
 /** Start a monitor with the specified key and mark it as primary */
 public static Monitor startPrimary(MonKey key) {
   return factory.startPrimary(key);
 }
示例#11
0
 /** Start using the passed in key. Note activity stats are incremented */
 public static Monitor start(MonKey key) {
   return factory.start(key);
 }
示例#12
0
 /**
  * Return a timing monitor with units in milliseconds, that is not aggregated into the jamon
  * stats. The concept of primary allows you to correlate performance of all monitors with the most
  * resource intensive things the app does which helps you determine scalability. <b>Sample
  * call:</b><br>
  *
  * <blockquote>
  *
  * <code><pre>
  *  Monitor mon=MonitorFactory.startPrimary("myPrimaryMonitor");<br>
  * ...code being timed...<br>
  * mon.stop();
  *
  * </pre></code>
  *
  * </blockquote>
  *
  * <br>
  * <br>
  */
 public static Monitor startPrimary(String label) {
   return factory.startPrimary(label);
 }
示例#13
0
 public static Monitor getMonitor() {
   return factory.getMonitor();
 }
示例#14
0
 /**
  * Return a timing monitor with units in milliseconds, that is not aggregated into the jamon
  * stats. stop() should be called on the returned monitor to indicate the time that the process
  * took. Note time monitors keep the starttime as an instance variable and so every time you want
  * to use a TimeMonitor you should get a new instance. <b>Sample call:</b><br>
  *
  * <blockquote>
  *
  * <code><pre>
  *  Monitor mon=MonitorFactory.start();<br>
  * ...code being timed...<br>
  * mon.stop();
  *
  * </pre></code>
  *
  * </blockquote>
  *
  * <br>
  * <br>
  */
 public static Monitor start() {
   return factory.start();
 }
示例#15
0
 /** Return the composite monitor of all monitors for this factory */
 public static MonitorComposite getRootMonitor() {
   return factory.getRootMonitor();
 }
示例#16
0
 /**
  * Get the time monitor associated with the passed in key. It will be created if it doesn't exist.
  * The units are in ms.
  */
 public static Monitor getTimeMonitor(MonKey key) {
   return factory.getTimeMonitor(key);
 }
示例#17
0
 /** Return the version of JAMon */
 public static String getVersion() {
   return factory.getVersion();
 }
示例#18
0
 /**
  * Determine if the monitor associated with the label, and the units currently exists. <b>Sample
  * call:</b><br>
  *
  * <blockquote>
  *
  * <code><pre>
  *  Monitor mon=MonitorFactory.getTimeMonitor("myPrimaryMonitor");<br>
  *
  * </pre></code>
  *
  * </blockquote>
  *
  * <br>
  * <br>
  */
 public static boolean exists(String label, String units) {
   return factory.exists(label, units);
 }
示例#19
0
 /** Remove the monitor associated with the passed in key */
 public static void remove(MonKey key) {
   factory.remove(key);
 }
示例#20
0
 /** Return true if the monitor associated with the passed in key exists */
 public static boolean exists(MonKey key) {
   return factory.exists(key);
 }
示例#21
0
 /**
  * Associate a range with a key/unit. Any monitor with the given unit will have this range. Any
  * monitor with
  *
  * <p>no range associated with its unit will have no range.
  */
 public static void setRangeDefault(String key, RangeHolder rangeHolder) {
   factory.setRangeDefault(key, rangeHolder);
 }
示例#22
0
 /**
  * Return the composite monitor (a collection of monitors) associated with the passed in units.
  * Note in JAMon 1.0 this method would take a lable and would return all monitors that matched
  * that criterion. This ability is now better performed using ArraySQL from the FormattedDataSet
  * API. See JAMonAdmin.jsp for an example. <b>Sample call:</b><br>
  *
  * <blockquote>
  *
  * <code><pre>
  *  Monitor mon=MonitorFactory.getComposite("ms.");<br>
  *  mon=MonitorFactory.getComposite("allMonitors");<br>
  *
  * </pre></code>
  *
  * </blockquote>
  *
  * <br>
  * <br>
  */
 public static MonitorComposite getComposite(String units) {
   return factory.getComposite(units);
 }
示例#23
0
 public static void enableGlobalActive(boolean enable) {
   factory.enableGlobalActive(enable);
 }
示例#24
0
 /** This returns the number of monitors in this factory. */
 public static int getNumRows() {
   return factory.getNumRows();
 }
示例#25
0
 /**
  * This returns the data for basic data with no range info.
  *
  * <p>The various getXXXData() methods of CompositeMonitors can return this information and more.
  */
 public static Object[][] getData() {
   return factory.getRootMonitor().getBasicData();
 }
示例#26
0
 /** Return the header for displaying what ranges are available. */
 public static String[] getRangeHeader() {
   return factory.getRangeHeader();
 }
示例#27
0
 /** Iterator that contains Monitor's that are in this factory */
 public static Iterator iterator() {
   return factory.iterator();
 }
示例#28
0
 /** Return the ranges in this factory. */
 public static Object[][] getRangeNames() {
   return factory.getRangeNames();
 }
示例#29
0
 public static boolean isActivityTrackingEnabled() {
   return factory.isActivityTrackingEnabled();
 }
示例#30
0
 /**
  * Used when you want to create your own key for the monitor. This works similarly to a group by
  * clause where the key is any columns used after the group by clause.
  */
 public static Monitor add(MonKey key, double value) {
   return factory.add(key, value);
 }