setQueueWaitEnd(other.getQueueWaitEnd());
@Nullable @Override public ProfileInfo apply(@Nullable Entry<String, UserBitShared.QueryProfile> input) { if (input == null || input.getValue() == null) { return ProfileInfo.getDefault(); } //Constructing ProfileInfo final String queryID = input.getKey(); final QueryProfile profile = input.getValue(); //For cases where query was never queued final long assumedQueueEndTime = profile.getQueueWaitEnd()> 0 ? profile.getQueueWaitEnd() : profile.getPlanEnd(); return new ProfileInfo( queryID, new Timestamp(profile.getStart()), profile.getForeman().getAddress(), profile.getTotalFragments(), profile.getUser(), profile.getQueueName(), computeDuration(profile.getStart(), profile.getPlanEnd()), computeDuration(profile.getPlanEnd(), assumedQueueEndTime), computeDuration(assumedQueueEndTime, profile.getEnd()), profile.getState().name(), profile.getQuery() ); } });
public String getQueuedDuration() { //Check if State is ENQUEUED if (profile.getState() == QueryState.ENQUEUED) { return (new SimpleDurationFormat(profile.getPlanEnd(), System.currentTimeMillis())).verbose(); } //Check if Queue Wait End is known if (profile.getQueueWaitEnd() > 0L) { return (new SimpleDurationFormat(profile.getPlanEnd(), profile.getQueueWaitEnd())).verbose(); } //Unable to estimate/calculate Specific Time spent in Queue return NOT_AVAILABLE_LABEL; }
setQueueWaitEnd(other.getQueueWaitEnd());
output.writeInt64(18, message.getPlanEnd(), false); if(message.hasQueueWaitEnd()) output.writeInt64(19, message.getQueueWaitEnd(), false); if(message.hasTotalCost()) output.writeDouble(20, message.getTotalCost(), false);
if (profile.getQueueWaitEnd() > 0L) { return (new SimpleDurationFormat(profile.getQueueWaitEnd(), queryEndTime)).verbose();
output.writeInt64(18, message.getPlanEnd(), false); if(message.hasQueueWaitEnd()) output.writeInt64(19, message.getQueueWaitEnd(), false); if(message.hasTotalCost()) output.writeDouble(20, message.getTotalCost(), false);