Procedure proc = (Procedure)rowKey;
if (debug.val) LOG.debug("Collecting BatchPlanner stats for " + proc.getName());
// We're going to create a new profiler that we can use
// to add up all of the values from the individual BatchPlannerProfilers
BatchPlannerProfiler total = new BatchPlannerProfiler();
ProfileMeasurement totalPMs[] = total.getProfileMeasurements();
// Find all of the BatchPlanners for each partition for our target procedure
Collection<BatchPlanner> planners = this.getBatchPlanners(proc);
for (BatchPlanner planner : planners) {
BatchPlannerProfiler profiler = planner.getDebugContext().getProfiler();
if (profiler == null) continue;
ProfileMeasurement profilerPMs[] = profiler.getProfileMeasurements();
assert(totalPMs.length == profilerPMs.length);
for (int i = 0; i < totalPMs.length; i++) {
totalPMs[i].appendTime(profilerPMs[i]);
} // FOR