mirror of
				https://github.com/facebook/zstd.git
				synced 2025-10-31 16:47:48 +02:00 
			
		
		
		
	benchmark more can test targetCBlockSize
This commit is contained in:
		| @@ -200,6 +200,7 @@ BMK_advancedParams_t BMK_initAdvancedParams(void) | ||||
|         BMK_both,               /* mode */ | ||||
|         BMK_TIMETEST_DEFAULT_S, /* nbSeconds */ | ||||
|         0,                      /* blockSize */ | ||||
|         0,               /* targetCBlockSize */ | ||||
|         0,                      /* nbWorkers */ | ||||
|         0,                      /* realTime */ | ||||
|         0,                      /* additionalParam */ | ||||
| @@ -275,6 +276,8 @@ static void BMK_initCCtx( | ||||
|             (int)adv->literalCompressionMode)); | ||||
|     CHECK_Z(ZSTD_CCtx_setParameter( | ||||
|             ctx, ZSTD_c_strategy, (int)comprParams->strategy)); | ||||
|     CHECK_Z(ZSTD_CCtx_setParameter( | ||||
|             ctx, ZSTD_c_targetCBlockSize, (int)adv->targetCBlockSize)); | ||||
|     CHECK_Z(ZSTD_CCtx_loadDictionary(ctx, dictBuffer, dictBufferSize)); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -100,6 +100,7 @@ typedef struct { | ||||
|     BMK_mode_t mode;        /* 0: all, 1: compress only 2: decode only */ | ||||
|     unsigned nbSeconds;     /* default timing is in nbSeconds */ | ||||
|     size_t blockSize;       /* Maximum size of each block*/ | ||||
|     size_t targetCBlockSize;/* Approximative size of compressed blocks */ | ||||
|     int nbWorkers;          /* multithreading */ | ||||
|     unsigned realTime;      /* real time priority */ | ||||
|     int additionalParam;    /* used by python speed benchmark */ | ||||
|   | ||||
| @@ -218,6 +218,10 @@ the last one takes effect. | ||||
|     expected. This feature allows for controlling the guess when needed. | ||||
|     Exact guesses result in better compression ratios. Overestimates result in slightly | ||||
|     degraded compression ratios, while underestimates may result in significant degradation. | ||||
| * `--target-compressed-block-size=#`: | ||||
|     Attempt to produce compressed blocks of approximately this size. | ||||
|     This will split larger blocks in order to approach this target. | ||||
|     Notably useful to improve latency when the receiver can make use of early data sooner. | ||||
| * `-o FILE`: | ||||
|     save result into `FILE`. | ||||
| * `-f`, `--force`: | ||||
|   | ||||
| @@ -1374,6 +1374,7 @@ int main(int argCount, const char* argv[]) | ||||
|             CLEAN_RETURN(1); | ||||
|         } | ||||
|         benchParams.blockSize = blockSize; | ||||
|         benchParams.targetCBlockSize = targetCBlockSize; | ||||
|         benchParams.nbWorkers = (int)nbWorkers; | ||||
|         benchParams.realTime = (unsigned)setRealTimePrio; | ||||
|         benchParams.nbSeconds = bench_nbSeconds; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user