diff --git a/tests/fullbench.c b/tests/fullbench.c index b996fc5cd..3340e9b53 100644 --- a/tests/fullbench.c +++ b/tests/fullbench.c @@ -160,6 +160,19 @@ local_ZSTD_compressStream(const void* src, size_t srcSize, return buffOut.pos; } +static size_t +local_ZSTD_compressStream_freshCCtx(const void* src, size_t srcSize, + void* dst, size_t dstCapacity, + void* buff2) +{ + ZSTD_CCtx* const cctx = ZSTD_createCCtx(); + assert(cctx != NULL); + + return local_ZSTD_compressStream(src, srcSize, dst, dstCapacity, buff2); + + ZSTD_freeCCtx(cctx); +} + static size_t local_ZSTD_compress_generic_end(const void* src, size_t srcSize, void* dst, size_t dstCapacity, @@ -354,6 +367,9 @@ static int benchMem(unsigned benchNb, case 42: benchFunction = local_ZSTD_decompressStream; benchName = "decompressStream"; break; + case 43: + benchFunction = local_ZSTD_compressStream_freshCCtx; benchName = "compressStream_freshCCtx"; + break; case 51: benchFunction = local_ZSTD_compress_generic_continue; benchName = "compress_generic, continue"; break;