|
@@ -521,7 +521,8 @@ void TransferServer::appendTransformed(unsigned chunkIndex, ITransformer * input
|
|
|
|
|
|
const offset_t startInputOffset = curPartition.inputOffset;
|
|
|
const offset_t startOutputOffset = curPartition.outputOffset;
|
|
|
-
|
|
|
+ stat_type prevNumWrites = out->getStatistic(StNumDiskWrites);
|
|
|
+ stat_type prevNumReads = input->getStatistic(StNumDiskReads);
|
|
|
for (;;)
|
|
|
{
|
|
|
unsigned gotLength = input->getBlock(out);
|
|
@@ -541,6 +542,12 @@ void TransferServer::appendTransformed(unsigned chunkIndex, ITransformer * input
|
|
|
curProgress.status = (gotLength == 0) ? OutputProgress::StatusCopied : OutputProgress::StatusActive;
|
|
|
curProgress.inputLength = input->tell()-startInputOffset;
|
|
|
curProgress.outputLength = out->tell()-startOutputOffset;
|
|
|
+ stat_type curNumWrites = out->getStatistic(StNumDiskWrites);
|
|
|
+ stat_type curNumReads = input->getStatistic(StNumDiskReads);
|
|
|
+ curProgress.numWrites += (curNumWrites - prevNumWrites);
|
|
|
+ curProgress.numReads += (curNumReads - prevNumReads);
|
|
|
+ prevNumWrites = curNumWrites;
|
|
|
+ prevNumReads = curNumReads;
|
|
|
if (crcOut)
|
|
|
curProgress.outputCRC = crcOut->getCRC();
|
|
|
if (calcInputCRC)
|
|
@@ -688,10 +695,12 @@ void TransferServer::transferChunk(unsigned chunkIndex)
|
|
|
size32_t fixedTextLength = (size32_t)curPartition.fixedText.length();
|
|
|
if (fixedTextLength || curPartition.inputName.isNull())
|
|
|
{
|
|
|
+ stat_type prevWrites = out->getStatistic(StNumDiskWrites);
|
|
|
out->write(fixedTextLength, curPartition.fixedText.get());
|
|
|
curProgress.status = OutputProgress::StatusCopied;
|
|
|
curProgress.inputLength = fixedTextLength;
|
|
|
curProgress.outputLength = fixedTextLength;
|
|
|
+ curProgress.numWrites += (out->getStatistic(StNumDiskWrites)-prevWrites);
|
|
|
if (crcOut)
|
|
|
curProgress.outputCRC = crcOut->getCRC();
|
|
|
sendProgress(curProgress);
|
|
@@ -864,7 +873,9 @@ processedProgress:
|
|
|
{
|
|
|
char null = 0;
|
|
|
offset_t lastOffset = lastChunk.outputOffset+lastChunk.outputLength;
|
|
|
+ stat_type prevWrites = outio->getStatistic(StNumDiskWrites);
|
|
|
outio->write(lastOffset-sizeof(null),sizeof(null),&null);
|
|
|
+ curProgress.numWrites += (outio->getStatistic(StNumDiskWrites)-prevWrites);
|
|
|
LOG(MCdebugProgress, unknownJob, "Extend length of target file to %" I64F "d", lastOffset);
|
|
|
}
|
|
|
}
|