1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

Update results.csv, add Row hash to regression test

This commit is contained in:
Sen Huang
2021-04-02 08:07:10 -07:00
parent 4694423c4f
commit 4d63d6e8aa
4 changed files with 552 additions and 255 deletions

View File

@ -92,6 +92,72 @@
.advanced_api_only = 1, \
};
/* Define a config specifically to test row hash based levels and settings.
*/
#define ROW_LEVEL(x, y) \
param_value_t const row_##y##_level_##x##_param_values[] = { \
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
{.param = ZSTD_c_compressionLevel, .value = x}, \
}; \
param_value_t const row_##y##_level_##x##_param_values_dms[] = { \
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
{.param = ZSTD_c_compressionLevel, .value = x}, \
{.param = ZSTD_c_enableDedicatedDictSearch, .value = 0}, \
{.param = ZSTD_c_forceAttachDict, .value = ZSTD_dictForceAttach}, \
}; \
param_value_t const row_##y##_level_##x##_param_values_dds[] = { \
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
{.param = ZSTD_c_compressionLevel, .value = x}, \
{.param = ZSTD_c_enableDedicatedDictSearch, .value = 1}, \
{.param = ZSTD_c_forceAttachDict, .value = ZSTD_dictForceAttach}, \
}; \
param_value_t const row_##y##_level_##x##_param_values_dictcopy[] = { \
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
{.param = ZSTD_c_compressionLevel, .value = x}, \
{.param = ZSTD_c_enableDedicatedDictSearch, .value = 0}, \
{.param = ZSTD_c_forceAttachDict, .value = ZSTD_dictForceCopy}, \
}; \
param_value_t const row_##y##_level_##x##_param_values_dictload[] = { \
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
{.param = ZSTD_c_compressionLevel, .value = x}, \
{.param = ZSTD_c_enableDedicatedDictSearch, .value = 0}, \
{.param = ZSTD_c_forceAttachDict, .value = ZSTD_dictForceLoad}, \
}; \
config_t const row_##y##_level_##x = { \
.name = "level " #x " row " #y, \
.cli_args = "-" #x, \
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values), \
.advanced_api_only = 1, \
}; \
config_t const row_##y##_level_##x##_dict_dms = { \
.name = "level " #x " row " #y " with dict dms", \
.cli_args = "-" #x, \
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values_dms), \
.use_dictionary = 1, \
.advanced_api_only = 1, \
}; \
config_t const row_##y##_level_##x##_dict_dds = { \
.name = "level " #x " row " #y " with dict dds", \
.cli_args = "-" #x, \
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values_dds), \
.use_dictionary = 1, \
.advanced_api_only = 1, \
}; \
config_t const row_##y##_level_##x##_dict_copy = { \
.name = "level " #x " row " #y" with dict copy", \
.cli_args = "-" #x, \
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values_dictcopy), \
.use_dictionary = 1, \
.advanced_api_only = 1, \
}; \
config_t const row_##y##_level_##x##_dict_load = { \
.name = "level " #x " row " #y " with dict load", \
.cli_args = "-" #x, \
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values_dictload), \
.use_dictionary = 1, \
.advanced_api_only = 1, \
};
#define PARAM_VALUES(pv) \
{ .data = pv, .size = sizeof(pv) / sizeof((pv)[0]) }
@ -99,6 +165,7 @@
#undef LEVEL
#undef FAST_LEVEL
#undef ROW_LEVEL
static config_t no_pledged_src_size = {
.name = "no source size",
@ -243,7 +310,9 @@ static config_t const* g_configs[] = {
#define FAST_LEVEL(x) &level_fast##x, &level_fast##x##_dict,
#define LEVEL(x) &level_##x, &level_##x##_dict, &level_##x##_dict_dms, &level_##x##_dict_dds, &level_##x##_dict_copy, &level_##x##_dict_load,
#define ROW_LEVEL(x, y) &row_##y##_level_##x, &row_##y##_level_##x##_dict_dms, &row_##y##_level_##x##_dict_dds, &row_##y##_level_##x##_dict_copy, &row_##y##_level_##x##_dict_load,
#include "levels.h"
#undef ROW_LEVEL
#undef LEVEL
#undef FAST_LEVEL