}
write(String.format("\">%s</th><th>%s</th>", report.getConfiguration().name, report.getCluster()));
int iteration = 0;
for (Aggregation aggregation : aggregations) {
Statistics statistics = aggregation.totalStats;
OperationStats operationStats = statistics == null ? null : statistics.getOperationsStats().get(operation);
long period = TimeUnit.MILLISECONDS.toNanos(statistics.getEnd() - statistics.getBegin());
writeRepresentations(operationStats, operation, report.getCluster().getClusterIndex(), iteration, "total",
aggregation.totalThreads, period, hasPercentiles, hasHistograms, false, aggregation.anySuspect(operation));
++iteration;
}
write("</tr>\n");
for (int node = 0; node < nodeCount; ++node) {
write(String.format("<tr id=\"e%d\" style=\"visibility: collapse;\"><th colspan=\"2\" style=\"text-align: right\">node%d</th>", elementCounter++, node));
for (Aggregation aggregation : aggregations) {
Statistics statistics = node >= aggregation.nodeStats.size() ? null : aggregation.nodeStats.get(node);
OperationStats operationStats = null;
long period = 0;
if (statistics != null) {
operationStats = statistics.getOperationsStats().get(operation);
period = TimeUnit.MILLISECONDS.toNanos(statistics.getEnd() - statistics.getBegin());
}
int threads = node >= aggregation.nodeThreads.size() ? 0 : aggregation.nodeThreads.get(node);
writeRepresentations(operationStats, operation, report.getCluster().getClusterIndex(), iteration, "node" + node,
threads, period, hasPercentiles, hasHistograms, false, aggregation.anySuspect(operation));
}