mirror of
https://github.com/facebook/zstd.git
synced 2025-12-07 00:02:39 -05:00
Always update bytes status in FIO_ctx_t
This commit is contained in:
parent
60ee0519ca
commit
28a9dc78c3
@ -1508,7 +1508,8 @@ FIO_compressFilename_internal(FIO_prefs_t* const prefs,
|
||||
}
|
||||
|
||||
/* Status */
|
||||
|
||||
fCtx->totalBytesInput += (size_t)readsize;
|
||||
fCtx->totalBytesOutput += (size_t)compressedfilesize;
|
||||
DISPLAYLEVEL(2, "\r%79s\r", "");
|
||||
if (g_display_prefs.displayLevel >= 2) {
|
||||
if (g_display_prefs.displayLevel >= 3 || fCtx->nbFilesTotal <= 1) {
|
||||
@ -1525,10 +1526,6 @@ FIO_compressFilename_internal(FIO_prefs_t* const prefs,
|
||||
dstFileName);
|
||||
}
|
||||
}
|
||||
if (fCtx->nbFilesTotal > 1) {
|
||||
fCtx->totalBytesInput += (size_t)readsize;
|
||||
fCtx->totalBytesOutput += (size_t)compressedfilesize;
|
||||
}
|
||||
}
|
||||
|
||||
/* Elapsed Time and CPU Load */
|
||||
@ -2429,15 +2426,13 @@ static int FIO_decompressFrames(dRess_t ress, FILE* srcFile,
|
||||
} } /* for each frame */
|
||||
|
||||
/* Final Status */
|
||||
fCtx->totalBytesOutput += (size_t)filesize;
|
||||
DISPLAYLEVEL(2, "\r%79s\r", "");
|
||||
/* No status message in pipe mode (stdin - stdout) or multi-files mode */
|
||||
if (g_display_prefs.displayLevel >= 2) {
|
||||
if (fCtx->nbFilesTotal <= 1 || g_display_prefs.displayLevel >= 3) {
|
||||
DISPLAYLEVEL(2, "%-20s: %llu bytes \n", srcFileName, filesize);
|
||||
}
|
||||
if (fCtx->nbFilesTotal > 1) {
|
||||
fCtx->totalBytesOutput += (size_t)filesize;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user