final String [] columns = {"Minor Fragment", "Setup", "Process", "Wait", "Max Batches", "Max Records"};
TableBuilder builder = new TableBuilder(columns);
for (ImmutablePair<OperatorProfile, Integer> ip : ops) {
int minor = ip.getRight();
OperatorProfile op = ip.getLeft();
String path = new OperatorPathBuilder().setMajor(major).setMinor(minor).setOperator(op).build();
builder.appendCell(path, null);
builder.appendNanos(op.getSetupNanos(), null);
builder.appendNanos(op.getProcessNanos(), null);
builder.appendNanos(op.getWaitNanos(), null);
long maxBatches = Long.MIN_VALUE;
long maxRecords = Long.MIN_VALUE;
for (StreamProfile sp : op.getInputProfileList()) {
maxBatches = Math.max(sp.getBatches(), maxBatches);
maxRecords = Math.max(sp.getRecords(), maxRecords);
}
builder.appendInteger(maxBatches, null);