/** * @return Get query planning time. If the planning hasn't started, returns "Planning not started". If planning hasn't * completed, returns "Still planning". */ @SuppressWarnings("unused") public String getPlanningTime() { final QueryProfile profile = getProfile(); if (!profile.hasPlanningStart() || profile.getPlanningStart() == 0) { return "Planning not started"; } if (!profile.hasPlanningEnd() || profile.getPlanningEnd() == 0) { return "Still planning"; } // Starting from 3.0, the planning time includes the resource queueing time. Thus, correcting for it when resource scheduling time exists long planningPlusSchedulingTime = profile.getPlanningEnd() - profile.getPlanningStart(); UserBitShared.ResourceSchedulingProfile r = profile.getResourceSchedulingProfile(); if (r == null || r.getResourceSchedulingStart() == 0 || r.getResourceSchedulingEnd() == 0) { return NUMBER_FORMAT.format(planningPlusSchedulingTime) + "ms"; } long schedulingTime = r.getResourceSchedulingEnd() - r.getResourceSchedulingStart(); return NUMBER_FORMAT.format(planningPlusSchedulingTime - schedulingTime) + "ms"; }
setPlanningStart(other.getPlanningStart());
output.writeString(16, message.getErrorNode(), false); if(message.hasPlanningStart()) output.writeInt64(17, message.getPlanningStart(), false); if(message.hasPlanningEnd()) output.writeInt64(18, message.getPlanningEnd(), false);
private void parsePlanningDetails() { if (queryProfile.getPlanningEnd() > 0 && queryProfile.getPlanningStart() > 0) { jobDetails.setTimeSpentInPlanning(queryProfile.getPlanningEnd() - queryProfile.getPlanningStart()); } else { jobDetails.setTimeSpentInPlanning(null); } // Not yet available. jobDetails.setPlansConsidered(null); }