@Override public Void visitSendingExchange(Exchange exchange, Wrapper wrapper) throws RuntimeException { Stats stats = wrapper.getStats(); stats.addCost(exchange.getAggregateSendCost()); stats.addMaxWidth(exchange.getMaxSendWidth()); return super.visitSendingExchange(exchange, wrapper); }
@Override public Void visitReceivingExchange(Exchange exchange, Wrapper wrapper) throws RuntimeException { wrapper.getStats().addCost(exchange.getAggregateReceiveCost()); // no traversal since it would cross fragment boundary. return null; }