Source:
<code>protected void deriveNodeDetails(Trace trace, List<Node> nodes, List<NodeDetails> rts, boolean initial, Set<Property> commonProperties) { for (int i = 0; i < nodes.size(); i++) { Node n = nodes.get(i); boolean ignoreNode = false; boolean ignoreChildNodes = false; if (n.getClass() == Consumer.class && ((Consumer) n).getEndpointType() == null) { ignoreNode = true; } else if (n.getClass() == Producer.class && ((Producer) n).getEndpointType() == null) { ignoreNode = true; ignoreChildNodes = true; } if (!ignoreNode) { NodeDetails nd = new NodeDetails(); nd.setId(UUID.randomUUID().toString()); nd.setTraceId(trace.getTraceId()); nd.setFragmentId(trace.getFragmentId()); nd.setTransaction(trace.getTransaction()); nd.setCorrelationIds(n.getCorrelationIds()); <START> nd.setElapsed(n.getDuration()); <END> nd.setActual(n.getDuration() - calculateChildElapsedTime(n)); if (n.getType() == NodeType.Component) { nd.setComponentType(((Component) n).getComponentType()); } else { nd.setComponentType(n.getType().name()); } if (trace.getHostName() != null && !trace.getHostName().trim().isEmpty()) { nd.setHostName(trace.getHostName()); } if (initial) { nd.setProperties(trace.allProperties()); nd.setInitial(true); } else { nd.getProperties().addAll(n.getProperties()); nd.getProperties().addAll(commonProperties); } nd.setTimestamp(n.getTimestamp()); nd.setType(n.getType()); nd.setUri(n.getUri()); nd.setOperation(n.getOperation()); rts.add(nd); } initial = false; if (!ignoreChildNodes && n.interactionNode()) { deriveNodeDetails(trace, ((InteractionNode) n).getNodes(), rts, initial, commonProperties); } } }</code><technical_language>docs: elapsed time represents total time spent a component (including calls child components) change span finish - span start</technical_language>

Target:
protected void deriveNodeDetails(Trace trace, List<Node> nodes, List<NodeDetails> rts, boolean initial, Set<Property> commonProperties) { for (int i = 0; i < nodes.size(); i++) { Node n = nodes.get(i); boolean ignoreNode = false; boolean ignoreChildNodes = false; if (n.getClass() == Consumer.class && ((Consumer) n).getEndpointType() == null) { ignoreNode = true; } else if (n.getClass() == Producer.class && ((Producer) n).getEndpointType() == null) { ignoreNode = true; ignoreChildNodes = true; } if (!ignoreNode) { NodeDetails nd = new NodeDetails(); nd.setId(UUID.randomUUID().toString()); nd.setTraceId(trace.getTraceId()); nd.setFragmentId(trace.getFragmentId()); nd.setTransaction(trace.getTransaction()); nd.setCorrelationIds(n.getCorrelationIds()); nd.setElapsed(n.getDuration()); nd.setActual(calculateActualTime(n)); if (n.getType() == NodeType.Component) { nd.setComponentType(((Component) n).getComponentType()); } else { nd.setComponentType(n.getType().name()); } if (trace.getHostName() != null && !trace.getHostName().trim().isEmpty()) { nd.setHostName(trace.getHostName()); } if (initial) { nd.setProperties(trace.allProperties()); nd.setInitial(true); } else { nd.getProperties().addAll(n.getProperties()); nd.getProperties().addAll(commonProperties); } nd.setTimestamp(n.getTimestamp()); nd.setType(n.getType()); nd.setUri(n.getUri()); nd.setOperation(n.getOperation()); rts.add(nd); } initial = false; if (!ignoreChildNodes && n.interactionNode()) { deriveNodeDetails(trace, ((InteractionNode) n).getNodes(), rts, initial, commonProperties); } } }