public String getName() { return aggregate.getName(); }
public Object invoke(String string, Object[] aObjects, String[] aStrings) throws MBeanException, ReflectionException { if ("reset".equals(string)) { etmMonitor.reset(aggregate.getName()); } return null; }
public Object invoke(String string, Object[] aObjects, String[] aStrings) throws MBeanException, ReflectionException { if ("reset".equals(string)) { etmMonitor.reset(aggregate.getName()); } return null; }
public void insert(MutableTreeNode newChild, int childIndex) { // TODO: this is wired - is there no way to locate a given // Node containing a specific user object? super.insert(newChild, childIndex); childSet.add(((Aggregate) ((AggregationNode) newChild).getUserObject()).getName()); }
private void writeNames(StringBuffer aBuffer, Aggregate aPoint, int depth) { if (depth > 0) { writeNestingLevel(aBuffer, depth); aBuffer.append(TREE_SIGN); } aBuffer.append(aPoint.getName()); aBuffer.append("<br />"); if (aPoint.hasChilds()) { int currentDepth = depth + 1; Map childs = aPoint.getChilds(); for (Iterator iterator = childs.values().iterator(); iterator.hasNext();) { Aggregate child = (Aggregate) iterator.next(); writeNames(aBuffer, child, currentDepth); } } }
private void writeNames(StringBuffer aBuffer, Aggregate aPoint, int depth) { if (depth > 0) { writeNestingLevel(aBuffer, depth); aBuffer.append(TREE_SIGN); } aBuffer.append(aPoint.getName()); aBuffer.append("<br />"); if (aPoint.hasChilds()) { int currentDepth = depth + 1; Map childs = aPoint.getChilds(); for (Iterator iterator = childs.values().iterator(); iterator.hasNext();) { Aggregate child = (Aggregate) iterator.next(); writeNames(aBuffer, child, currentDepth); } } }
public String convertValueToText(Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { if (value != null && value instanceof AggregationNode) { Aggregate aggregate = (Aggregate) ((AggregationNode) value).getUserObject(); return aggregate.getName() + " [" + aggregate.getMeasurements() + "]"; } return ""; }
public MBeanInfo getMBeanInfo() { return new OpenMBeanInfoSupport( Aggregate.class.getName(), "Performance results for " + aggregate.getName(), getAttributeInfos(), new OpenMBeanConstructorInfo[]{}, getOperations(), new MBeanNotificationInfo[]{} ); }
public MBeanInfo getMBeanInfo() { return new OpenMBeanInfoSupport( Aggregate.class.getName(), "Performance results for " + aggregate.getName(), getAttributeInfos(), new OpenMBeanConstructorInfo[]{}, getOperations(), new MBeanNotificationInfo[]{} ); }
public void onStateLoaded(AggregationStateLoadedEvent event) { if (isStopping) { return; } PersistentEtmState persistentEtmState = event.getState(); Map aggregates = persistentEtmState.getAggregates(); for (Iterator iterator = aggregates.values().iterator(); iterator.hasNext();) { Aggregate aggregate = (Aggregate) iterator.next(); try { registerMBean(mbeanServer, calculateObjectName(measurementDomain, aggregate), new EtmPointMBean(etmMonitor, aggregate), overwrite); } catch (JMException e) { log.warn("Unable to register EtmPoint " + aggregate.getName(), e); } } }
public void onStateLoaded(AggregationStateLoadedEvent event) { if (isStopping) { return; } PersistentEtmState persistentEtmState = event.getState(); Map aggregates = persistentEtmState.getAggregates(); for (Iterator iterator = aggregates.values().iterator(); iterator.hasNext();) { Aggregate aggregate = (Aggregate) iterator.next(); try { registerMBean(mbeanServer, calculateObjectName(measurementDomain, aggregate), new EtmPointMBean(etmMonitor, aggregate), overwrite); } catch (JMException e) { LOG.warn("Unable to register EtmPoint " + aggregate.getName(), e); } } }
protected void writeName(Aggregate aPoint) throws IOException { String link = "detail?point="; try { link = link + URLEncoder.encode(aPoint.getName(), HttpConsoleServer.DEFAULT_ENCODING); } catch (UnsupportedEncodingException e) { // ignored } link = ConsoleUtil.appendParameters(link, request.getRequestParameters()); response.write("<div class=\"parentname\" >"); response.write("<a href=\""); response.write(link); response.write("\" >"); response.write(encodeHtml(aPoint.getName())); response.write("</a></div>"); }
public void onRootCreate(RootCreateEvent event) { if (isStopping) { return; } Aggregate aggregate = event.getAggregate(); try { registerMBean(mbeanServer, calculateObjectName(measurementDomain, aggregate), new EtmPointMBean(etmMonitor, aggregate), overwrite); } catch (JMException e) { log.warn("Unable to register EtmPoint " + aggregate.getName(), e); } }
public void onRootCreate(RootCreateEvent event) { if (isStopping) { return; } Aggregate aggregate = event.getAggregate(); try { registerMBean(mbeanServer, calculateObjectName(measurementDomain, aggregate), new EtmPointMBean(etmMonitor, aggregate), overwrite); } catch (JMException e) { LOG.warn("Unable to register EtmPoint " + aggregate.getName(), e); } }
public void addLine(int nestingLevel, Aggregate aAggregate) { nameColumn.addEntry(new NestedEntry(nestingLevel, aAggregate.getName())); numberColumn.addEntry(new RightAlignedEntry(String.valueOf(aAggregate.getMeasurements()))); avgColumn.addEntry(new RightAlignedEntry(timeFormatter.format(aAggregate.getAverage()))); minColumn.addEntry(new RightAlignedEntry(timeFormatter.format(aAggregate.getMin()))); maxColumn.addEntry(new RightAlignedEntry(timeFormatter.format(aAggregate.getMax()))); totalColumn.addEntry(new RightAlignedEntry(timeFormatter.format(aAggregate.getTotal()))); }
public void addLine(int nestingLevel, Aggregate aAggregate) { nameColumn.addEntry(new NestedEntry(nestingLevel, aAggregate.getName())); numberColumn.addEntry(new RightAlignedEntry(String.valueOf(aAggregate.getMeasurements()))); avgColumn.addEntry(new RightAlignedEntry(timeFormatter.format(aAggregate.getAverage()))); minColumn.addEntry(new RightAlignedEntry(timeFormatter.format(aAggregate.getMin()))); maxColumn.addEntry(new RightAlignedEntry(timeFormatter.format(aAggregate.getMax()))); totalColumn.addEntry(new RightAlignedEntry(timeFormatter.format(aAggregate.getTotal()))); }
public void render(Map points) { assertNotNull(points); assertTrue(points.size() == 1); assertEquals(2, new TestHelper().countExecutions(points)); Aggregate aggregate = (Aggregate) points.get("test"); assertNotNull(aggregate); assertEquals("test", aggregate.getName()); assertEquals(2, aggregate.getMeasurements()); assertEquals(point.getTransactionTime() + point2.getTransactionTime(), aggregate.getTotal(), 0.000001); assertEquals(point2.getTransactionTime(), aggregate.getMin(), 0.000001); assertEquals(point.getTransactionTime(), aggregate.getMax(), 0.000001); }
public void render(Map points) { assertNotNull(points); assertEquals(1, points.size()); assertEquals(1, new TestHelper().countExecutions(points)); Aggregate aggregate = (Aggregate) points.get("test"); assertNotNull(aggregate); assertEquals("test", aggregate.getName()); assertEquals(1, aggregate.getMeasurements()); assertEquals(point.getTransactionTime(), aggregate.getTotal(), 0.000001); assertEquals(point.getTransactionTime(), aggregate.getMin(), 0.000001); assertEquals(point.getTransactionTime(), aggregate.getMax(), 0.000001); } });
public void render(Map points) { assertEquals(expectedExecutions, new TestHelper().countExecutions(points)); assertNotNull(points); assertTrue(points.size() == 1); Aggregate aggregate = (Aggregate) points.get(testPointGroup1); assertNotNull(aggregate); assertEquals(testPointGroup1, aggregate.getName()); assertEquals(group1.getMeasurements(), aggregate.getMeasurements()); assertEquals(group1.getTotal(), aggregate.getTotal(), 0.0001); assertEquals(group1.getMin(), aggregate.getMin(), 0.0001); assertEquals(group1.getMax(), aggregate.getMax(), 0.0001); } });