@Override public Monitor next() { return currentMonitorComposite.getMonitors()[index]; }
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; }
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; }
/** * Returns all the {@link Monitor}s in this repository. * * @return List of all {@link Monitor}s or an empty list if there aren't any. */ List<Monitor> getAll() { Monitor[] monitors = MonitorFactory.getRootMonitor().getMonitors(); if (monitors != null) { return Arrays.asList(monitors); } else { return new ArrayList<Monitor>(0); } }
public List<TableRowColumn> getTableRows() { List<TableRowColumn> l = new ArrayList<>(); if (sizeOfResultVector == 1) { Monitor[] monitors = new Monitor[mcs.size()]; for (int i = 0; i < monitors.length; i++) { monitors[i] = mcs.get(i).getMonitors()[0]; } l.add(new TableRowColumn(monitors, experimentName, "")); } else { for (MonitorComposite mc : mcs) { l.add(new TableRowColumn(mc.getMonitors(), experimentName, getRev(mc))); } } return l; }
private SQLDeArgMon appendDetails(String stackTrace) { if ("".equalsIgnoreCase(stackTrace)) return this; Monitor[] monArr=monitors.getMonitors(); StringBuilder sb=new StringBuilder(); sb.append(monArr[0].getMonKey().getDetails()).append("\n").append(stackTrace); for (int i=0;i<monArr.length;i++) { Monitor mon=monArr[i]; mon.getMonKey().setDetails(sb.toString()); } return this; }
public void add(MonKeyImp monkey, int index, double value) { try { get(monkey).getMonitors()[index].add(value); } catch (IndexOutOfBoundsException e) { e.printStackTrace(); logger.error("index too big, is: "+index+" max = " + get(monkey).getMonitors().length); } }
private static ProfileMonitor[] getMonitorsFrom(final MonitorFactoryInterface factory) { MonitorComposite rootMonitor = factory.getRootMonitor(); Monitor[] monitors = rootMonitor.getMonitors(); if (monitors == null) { return new JamonMonitor[0]; } ProfileMonitor[] profMonitors = new JamonMonitor[monitors.length]; for (int i = 0; i < monitors.length; i++) { profMonitors[i] = new JamonMonitor(monitors[i]); } return profMonitors; }
public Monitor start(MonKeyImp monkey, int index) { return get(monkey).getMonitors()[index].start(); }
/** * Gets the monitors. * * @return the monitors */ public static ProfileMonitor[] getMonitors() { MonitorComposite rootMonitor = MonitorFactory.getRootMonitor(); Monitor[] monitors = rootMonitor.getMonitors(); if (monitors == null) { return new JamonMonitor[0]; } ProfileMonitor[] profMonitors = new JamonMonitor[monitors.length]; for (int i = 0; i < monitors.length; i++) { profMonitors[i] = new JamonMonitor(monitors[i]); } return profMonitors; }
out.println("Monitors:"); out.println("~~~~~~~~"); List<Monitor> monitors = new ArrayList<>(asList(MonitorFactory.getRootMonitor().getMonitors())); monitors.sort((m1, m2) -> Double.compare(m2.getTotal(), m1.getTotal())); int lm = 10;