public void add(EtmPoint point) { ExecutionAggregate aggregate = getAggregate(point.getName()); aggregate.addTransaction(point); }
public void add(EtmPoint point) { ExecutionAggregate aggregate = getAggregate(point.getName()); aggregate.addTransaction(point); }
/** * Append a measurement result from the end of a tree. * * @param newTree The tree to the measurement result. */ public void appendPath(LinkedList newTree) { EtmPoint current = (EtmPoint) newTree.removeFirst(); ExecutionAggregate aggregate = getChild(current.getName()); if (newTree.size() == 0) { aggregate.addTransaction(current); } else { aggregate.appendPath(newTree); } }
/** * Append a measurement result from the end of a tree. * * @param newTree The tree to the measurement result. */ public void appendPath(LinkedList newTree) { EtmPoint current = (EtmPoint) newTree.removeFirst(); ExecutionAggregate aggregate = getChild(current.getName()); if (newTree.isEmpty()) { aggregate.addTransaction(current); } else { aggregate.appendPath(newTree); } }
public void add(EtmPoint point) { // shortcut for parent == null; if (point.getParent() == null) { ExecutionAggregate aggregate = getAggregate(point.getName()); aggregate.addTransaction(point); return; } // TODO check alternative strategy to improve performance // find tree root node LinkedList path = new LinkedList(); path.add(point); EtmPoint rootNode = point.getParent(); while (rootNode != null) { path.addFirst(rootNode); rootNode = rootNode.getParent(); } rootNode = (EtmPoint) path.removeFirst(); ExecutionAggregate aggregate = getAggregate(rootNode.getName()); aggregate.appendPath(path); }
public void add(EtmPoint point) { // shortcut for parent == null; if (point.getParent() == null) { ExecutionAggregate aggregate = getAggregate(point.getName()); aggregate.addTransaction(point); return; } // TODO check alternative strategy to improve performance // find tree root node LinkedList path = new LinkedList(); path.add(point); EtmPoint rootNode = point.getParent(); while (rootNode != null) { path.addFirst(rootNode); rootNode = rootNode.getParent(); } rootNode = (EtmPoint) path.removeFirst(); ExecutionAggregate aggregate = getAggregate(rootNode.getName()); aggregate.appendPath(path); }
public void add(EtmPoint point) { LinkedList path = new LinkedList(); path.add(point.getName()); EtmPoint parent = point.getParent(); while (parent != null) { path.addFirst(parent.getName()); parent = parent.getParent(); } DefaultMutableTreeNode node = (DefaultMutableTreeNode) getRoot(); while (!path.isEmpty()) { String currentString = (String) path.removeFirst(); Enumeration childs = node.children(); DefaultMutableTreeNode currentChild = null; while (currentChild == null && childs.hasMoreElements()) { DefaultMutableTreeNode measurementNode = (DefaultMutableTreeNode) childs.nextElement(); Aggregate aggregate = (Aggregate) measurementNode.getUserObject(); if (aggregate.getName().equals(currentString)) { currentChild = measurementNode; } } if (currentChild == null) { currentChild = new DefaultMutableTreeNode(new ExecutionAggregate(currentString)); insertNodeInto(currentChild, node, getChildCount(currentChild)); } node = currentChild; } ((ExecutionAggregate) node.getUserObject()).addTransaction(point); nodeChanged(node); delegate.add(point); }
aggregates.put(point.getName(), aggregate); aggregate.addTransaction(point);
EtmPoint point = (EtmPoint) allPoints.get(i); if (point.getName().equals(testPointGroup1)) { group1.addTransaction(point); } else { group2.addTransaction(point);
EtmPoint point = (EtmPoint) allPoints.get(i); if (point.getName().equals(testPointGroup1)) { group1.addTransaction(point); } else { fail("Unknown group " + point.getName());
EtmPoint point = (EtmPoint) allPoints.get(i); if (point.getName().equals(testPointGroup1)) { group1.addTransaction(point); } else if (point.getName().equals(testPointGroup2)) { group2.addTransaction(point); } else if (point.getName().equals("nested" + testPointGroup1)) { nested1.addTransaction(point); } else if (point.getName().equals("nested" + testPointGroup2)) { nested2.addTransaction(point); } else { fail("Unknown point " + point.getName());