[PATCH]optimize compile_state_update performance

This commit is contained in:
liuwentan
2023-12-04 16:11:42 +08:00
parent edf3f31deb
commit c6346a73b0
5 changed files with 535 additions and 87 deletions

View File

@@ -148,7 +148,8 @@ void generate_compile_sample(const char *table_name, int sample_count)
fclose(fp);
}
void generate_group2compile_sample(const char *table_name, int sample_count)
void generate_group2compile_sample(const char *table_name, const char *vtable_name,
int sample_count)
{
FILE *fp = fopen(table_name, "w+");
if (NULL == fp) {
@@ -159,7 +160,7 @@ void generate_group2compile_sample(const char *table_name, int sample_count)
fprintf(fp, "%d\n", sample_count);
for (int i = 0; i < sample_count; i++) {
fprintf(fp, "%d\t%d\t1\t0\t%s\t1\n", i+1, 100+i, "null");
fprintf(fp, "%d\t%d\t0\t%s\t1\t1\n", i+1, 100+i, vtable_name);
}
fclose(fp);
@@ -542,12 +543,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF\t10\t./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "REGEX_100", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -555,6 +560,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -628,12 +635,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF\t10\t./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "REGEX_200", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -641,6 +652,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -714,12 +727,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF\t10\t./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "REGEX_300", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -727,6 +744,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -801,12 +820,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "EXPR_LITERAL_1K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -814,6 +837,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -888,12 +913,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "EXPR_LITERAL_5K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -901,6 +930,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -975,12 +1006,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "EXPR_LITERAL_10K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -988,6 +1023,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1062,12 +1099,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "EXPR_LITERAL_50K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1075,6 +1116,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1149,12 +1192,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "EXPR_LITERAL_100K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1162,6 +1209,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1236,12 +1285,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "EXPR_LITERAL_500K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1249,6 +1302,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1323,12 +1378,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "EXPR_LITERAL_1M", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1336,6 +1395,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1410,12 +1471,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "EXPR_LITERAL_2M", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1423,6 +1488,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1497,12 +1564,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "STREAM_1K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1510,6 +1581,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1581,12 +1654,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "STREAM_5K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1594,6 +1671,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1665,12 +1744,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "STREAM_10K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1678,6 +1761,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1749,12 +1834,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "STREAM_50K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1762,6 +1851,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1833,12 +1924,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "STREAM_100K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1846,6 +1941,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -1917,12 +2014,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "STREAM_500K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -1930,6 +2031,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2001,12 +2104,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "STREAM_1M", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2014,6 +2121,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2085,12 +2194,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "STREAM_2M", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2098,6 +2211,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2169,12 +2284,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "IP_1K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2182,6 +2301,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2256,12 +2377,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "IP_5K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2269,6 +2394,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2343,12 +2470,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "IP_10K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2356,6 +2487,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2430,12 +2563,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "IP_50K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2443,6 +2580,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2517,12 +2656,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "IP_100K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2530,6 +2673,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2604,12 +2749,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "IP_500K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2617,6 +2766,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2691,12 +2842,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "IP_1M", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2704,6 +2859,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2778,12 +2935,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "IP_5M", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2791,6 +2952,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2865,6 +3028,9 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "IP_10M", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
@@ -2878,6 +3044,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -2952,12 +3120,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "INTEGER_1K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -2965,6 +3137,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -3039,12 +3213,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "INTEGER_5K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -3052,6 +3230,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -3126,12 +3306,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "INTEGER_10K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -3139,6 +3323,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -3213,12 +3399,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "FLAG_1K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -3226,6 +3416,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -3300,12 +3492,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "FLAG_5K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -3313,6 +3509,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -3387,12 +3585,16 @@ protected:
fprintf(fp, "GROUP2COMPILE_PERF 10 ./GROUP2COMPILE_PERF\n");
fclose(fp);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", "FLAG_10K", 10);
struct maat_options *opts = maat_options_new();
maat_options_set_logger(opts, "./benchmark_rs_gtest.log", LOG_LEVEL_INFO);
maat_options_set_iris(opts, "./", "./");
maat_options_set_rule_effect_interval_ms(opts, 1000);
maat_options_set_caller_thread_number(opts, PERF_THREAD_NUM);
maat_options_set_expr_engine(opts, MAAT_EXPR_ENGINE_RS);
_shared_maat_inst = maat_new(opts, table_info_path);
maat_options_free(opts);
}
@@ -3400,6 +3602,8 @@ protected:
static void TearDownTestCase() {
maat_free(_shared_maat_inst);
log_handle_destroy(logger);
system_cmd_rmdir("COMPILE_PERF");
system_cmd_rmdir("GROUP2COMPILE_PERF");
}
static struct log_handle *logger;
@@ -3463,9 +3667,6 @@ int main(int argc, char ** argv)
::testing::InitGoogleTest(&argc, argv);
g_logger = log_handle_create("./benchmark_rs_gtest.log", 0);
generate_compile_sample("COMPILE_PERF", 10);
generate_group2compile_sample("GROUP2COMPILE_PERF", 10);
ret=RUN_ALL_TESTS();
log_handle_destroy(g_logger);