backuptask: track copy and upload statistics

This commit is contained in:
Girish Ramakrishnan
2025-10-20 13:22:51 +02:00
parent 854661e2d4
commit 07732310c1
7 changed files with 52 additions and 41 deletions

View File

@@ -170,12 +170,12 @@ async function tarPack(dataLayout, encryption, uploader, progressCallback) {
const [error] = await pipeline; // already wrapped in safe()
if (error) throw new BoxError(BoxError.EXTERNAL_ERROR, `tarPack pipeline error: ${error.message}`);
const stats = ps.stats();
const stats = ps.stats(); // { startTime, totalMsecs, transferred }
debug(`tarPack: pipeline finished: ${JSON.stringify(stats)}`);
await uploader.finish();
return {
stats: { fileCount, size: stats.transferred, ...stats },
stats: { fileCount, size: stats.transferred, transferred: stats.transferred },
integrity: { size: stats.transferred, fileCount, sha256: hash.digest('hex') }
};
}