public void finishPacket(WritePacketClientProfile pktProfile, PipelineAck pipelineAck) { if (pktProfile == null) { return; } if (pipelineAck != null) { pktProfile.profilesFromDataNodes = pipelineAck.getProfiles(); } pktProfile.timeInAckQueue = timeStartReceiveAck - pktProfile.startTime; pktProfile.timeReceiveAck = System.nanoTime() - timeStartReceiveAck; recentPacketProfile = pktProfile; timePreparePkt += pktProfile.timeBeforeAddToDataQueue; timeSendPkt += pktProfile.timeSendPacket; timeReceiveAck += pktProfile.timeReceiveAck; numPkts++; totalTimeInDataQueue += pktProfile.timeInDataQueue; totalTimeInAckQueue += pktProfile.timeInAckQueue; if (currentBlockProfile != null) { currentBlockProfile.updateDnProfiles(pipelineAck.getProfiles()); } }