long[] typeFails = new long[60];
double[] typeSums = new double[60];
Map<String, TransactionName> names = transactionType.getNames();
for (Entry<String, TransactionName> nameEntry : names.entrySet()) {
TransactionName transactionName = nameEntry.getValue();
List<Range> ranges = new ArrayList<Range>(transactionName.getRanges().values());
detailBuilder.append(transactionType.getId());
detailBuilder.append('\t');
detailBuilder.append(transactionName.getId());
detailBuilder.append('\t');
long[] totalCount = getTotalCount(ranges);
detailBuilder.append(arrayToString(totalCount));
detailBuilder.append('\t');
long[] failsCount = getFailsCount(ranges);
detailBuilder.append(arrayToString(failsCount));
detailBuilder.append('\t');
detailBuilder.append(transactionName.getMin());
detailBuilder.append('\t');
detailBuilder.append(transactionName.getMax());
detailBuilder.append('\t');
double[] sumCount = getSumCount(ranges);
detailBuilder.append(arrayToString(sumCount));
detailBuilder.append('\t');
detailBuilder.append(transactionName.getSum2());
detailBuilder.append('\n');
String key = transactionType.getId() + "\t" + transactionName.getId();
GraphLine detailLine = allDetailCache.get(key);
if (detailLine == null) {
detailLine = new GraphLine();
allDetailCache.put(key, detailLine);
}
detailLine.totalCounts = arrayAdd(detailLine.totalCounts, totalCount);
detailLine.failCounts = arrayAdd(detailLine.failCounts, failsCount);
detailLine.min += transactionName.getMin();
detailLine.max += transactionName.getMax();
detailLine.sums = arrayAdd(detailLine.sums, sumCount);
detailLine.sum2 += transactionName.getSum2();
typeCounts = arrayAdd(typeCounts, totalCount);
typeFails = arrayAdd(typeFails, failsCount);
typeSums = arrayAdd(typeSums, sumCount);
}