Merge pull request #2319 from facebook/fullbench_stream2
update fullbench for compressStream2()
This commit is contained in:
commit
c3ee284ca2
@ -232,12 +232,11 @@ local_ZSTD_compressStream_freshCCtx(const void* src, size_t srcSize,
|
|||||||
r = local_ZSTD_compressStream(src, srcSize, dst, dstCapacity, payload);
|
r = local_ZSTD_compressStream(src, srcSize, dst, dstCapacity, payload);
|
||||||
|
|
||||||
ZSTD_freeCCtx(cctx);
|
ZSTD_freeCCtx(cctx);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
local_ZSTD_compress_generic_end(const void* src, size_t srcSize,
|
local_ZSTD_compress2(const void* src, size_t srcSize,
|
||||||
void* dst, size_t dstCapacity,
|
void* dst, size_t dstCapacity,
|
||||||
void* payload)
|
void* payload)
|
||||||
{
|
{
|
||||||
@ -246,7 +245,25 @@ local_ZSTD_compress_generic_end(const void* src, size_t srcSize,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static size_t
|
static size_t
|
||||||
local_ZSTD_compress_generic_continue(const void* src, size_t srcSize,
|
local_ZSTD_compressStream2_end(const void* src, size_t srcSize,
|
||||||
|
void* dst, size_t dstCapacity,
|
||||||
|
void* payload)
|
||||||
|
{
|
||||||
|
ZSTD_outBuffer buffOut;
|
||||||
|
ZSTD_inBuffer buffIn;
|
||||||
|
(void)payload;
|
||||||
|
buffOut.dst = dst;
|
||||||
|
buffOut.size = dstCapacity;
|
||||||
|
buffOut.pos = 0;
|
||||||
|
buffIn.src = src;
|
||||||
|
buffIn.size = srcSize;
|
||||||
|
buffIn.pos = 0;
|
||||||
|
ZSTD_compressStream2(g_cstream, &buffOut, &buffIn, ZSTD_e_end);
|
||||||
|
return buffOut.pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t
|
||||||
|
local_ZSTD_compressStream2_continue(const void* src, size_t srcSize,
|
||||||
void* dst, size_t dstCapacity,
|
void* dst, size_t dstCapacity,
|
||||||
void* payload)
|
void* payload)
|
||||||
{
|
{
|
||||||
@ -437,11 +454,17 @@ static int benchMem(unsigned benchNb,
|
|||||||
case 43:
|
case 43:
|
||||||
benchFunction = local_ZSTD_compressStream_freshCCtx; benchName = "compressStream_freshCCtx";
|
benchFunction = local_ZSTD_compressStream_freshCCtx; benchName = "compressStream_freshCCtx";
|
||||||
break;
|
break;
|
||||||
|
case 50:
|
||||||
|
benchFunction = local_ZSTD_compress2; benchName = "compress2";
|
||||||
|
break;
|
||||||
case 51:
|
case 51:
|
||||||
benchFunction = local_ZSTD_compress_generic_continue; benchName = "compress_generic, continue";
|
benchFunction = local_ZSTD_compressStream2_end; benchName = "compressStream2, end";
|
||||||
break;
|
break;
|
||||||
case 52:
|
case 52:
|
||||||
benchFunction = local_ZSTD_compress_generic_end; benchName = "compress_generic, end";
|
benchFunction = local_ZSTD_compressStream2_end; benchName = "compressStream2, end & short";
|
||||||
|
break;
|
||||||
|
case 53:
|
||||||
|
benchFunction = local_ZSTD_compressStream2_continue; benchName = "compressStream2, continue";
|
||||||
break;
|
break;
|
||||||
case 61:
|
case 61:
|
||||||
benchFunction = local_ZSTD_compress_generic_T2_continue; benchName = "compress_generic, -T2, continue";
|
benchFunction = local_ZSTD_compress_generic_T2_continue; benchName = "compress_generic, -T2, continue";
|
||||||
@ -573,6 +596,11 @@ static int benchMem(unsigned benchNb,
|
|||||||
payload = &cparams;
|
payload = &cparams;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 52 :
|
||||||
|
/* compressStream2, short dstCapacity */
|
||||||
|
dstBuffSize--;
|
||||||
|
break;
|
||||||
|
|
||||||
/* test functions */
|
/* test functions */
|
||||||
/* convention: test functions have ID > 100 */
|
/* convention: test functions have ID > 100 */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user