@Override public Monitor next() { return currentMonitorComposite.getMonitors()[index]; }
/** A basic report in html format. It has summary info for all monitors but * no range info */ public String getReport() { return getReport(0, "asc"); }
public MonitorComposite filterByUnits(String units) { return new MonitorComposite(getMonitorsWithUnits(units)).setInstanceName(getInstanceName()).setDateCreated(getDateCreated()); }
/** Get basic data (which excludes range data) */ public Object[][] getBasicData() { if (!hasData()) return null; Object[][] data=new Object[getNumRows()][]; for (int i=0;i<numRows;i++) { data[i]=getBasicRowData((MonitorImp)monitors[i]); } return data; }
private SQLDeArgMon start() { synchronized (this) { // keep data from being clobbered while being accessed by this method if (monitors==null) { // note if this is called in the constructor then monitors would be created even if sql summary is disabled monitors=MonitorComposite.getMonitors(data); data=null; } } monitors.start(); return this; }
@Override public MonKey getMonKey() { if (!hasData()) return null; return getFirstMon().getMonKey(); }
MonitorFactory.setRangeDefault("points", getTestHolder()); String[] header = MonitorFactory.getComposite("ms.").getHeader(); data = MonitorFactory.getComposite("ms.").getData(); header = MonitorFactory.getComposite("ms.").getBasicHeader(); data = MonitorFactory.getComposite("ms.").getBasicData(); header = MonitorFactory.getComposite("ms.").getDisplayHeader(); data = MonitorFactory.getComposite("ms.").getDisplayData(); MonitorFactory.getComposite("ms.").disable(); header = MonitorFactory.getComposite("ms.").getHeader(); data = MonitorFactory.getComposite("ms.").getData();
if (!hasData()) return ""; String[] header=getBasicHeader(); Object[][] data=Misc.sort(getBasicData(), sortCol, sortOrder); int rows=data.length; int cols=header.length;
/** getComposite("AllMonitors") is the same as getRootMonitor() */ public MonitorComposite getRootMonitor() { return new MonitorComposite(getMonitors()); }
/** This returns the data for basic data with no range info. The various getXXXData() methods of * CompositeMonitors can return this information and more. */ public static Object[][] getData() { return factory.getRootMonitor().getBasicData(); }
private SQLDeArgMon add(double time) { monitors.add(time); return this; }
/** This returns the header for basic data with no range info in the header. * This method is deprecated. use the methods associated with the CompositeMonitor. * The various getXXXHeader() methods of CompositeMonitors can return this information and more. */ @Deprecated public static String[] getHeader() { return factory.getRootMonitor().getBasicHeader(); }
private SQLDeArgMon start() { synchronized (this) { // keep data from being clobbered while being accessed by this method if (monitors==null) { // note if this is called in the constructor then monitors would be created even if sql summary is disabled monitors=MonitorComposite.getMonitors(data); data=null; } } monitors.start(); return this; }
public MonKey getMonKey() { if (!hasData()) return null; return getFirstMon().getMonKey(); }
/** A basic report in html format that is sorted. It has summary info for all monitors but * no range info */ public String getReport(int sortCol, String sortOrder) { if (!hasData()) return ""; String[] header=getBasicHeader(); Object[][] data=Misc.sort(getBasicData(), sortCol, sortOrder); int rows=data.length; int cols=header.length; StringBuffer html=new StringBuffer(100000);// guess on report size html.append("\n<table border='1' rules='all'>\n"); for (int i=0;i<cols;i++) html.append("<th>"+header[i]+"</th>"); html.append("<th>"+header[0]+"</th>");//repeat first header html.append("\n"); for (int i=0;i<rows;i++) { html.append("<tr>"); for (int j=0;j<cols;j++) { html.append("<td>"+data[i][j]+"</td>"); } html.append("<td>"+data[i][0]+"</td>");// repeat first column html.append("</tr>\n"); } html.append("</table>"); return html.toString(); }
/** Get basic data (which excludes range data) */ public Object[][] getBasicData() { if (!hasData()) return null; Object[][] data=new Object[getNumRows()][]; for (int i=0;i<numRows;i++) { data[i]=getBasicRowData((MonitorImp)monitors[i]); } return data; }
/** Pass in the units (or range type) and return all monitors of that * type. 'AllMonitors' is a special argument returns a composite of surprise surprise all monitors *getComposite("AllMonitors") is the same as getRootMonitor() ; **/ public MonitorComposite getComposite(String units) { return new MonitorComposite(getMonitors(units)); }
/** * This returns the data for basic data with no range info. * * The various getXXXData() methods of CompositeMonitors can return this * information and more. * * * * * */ public static Object[][] getData() { return factory.getRootMonitor().getBasicData(); }
private SQLDeArgMon add(double time) { monitors.add(time); return this; }
/** * This returns the header for basic data with no range info in the header. * This method is deprecated. use the methods associated * * with the CompositeMonitor. The various getXXXHeader() methods of * CompositeMonitors can return this information and more. * * * * */ public static String[] getHeader() { return factory.getRootMonitor().getBasicHeader(); }