[PATCH] add plugin table rule statistics

This commit is contained in:
liuwentan
2023-07-12 18:14:28 +08:00
parent 6911420ebf
commit b1dcf0d5b0
10 changed files with 9 additions and 152 deletions

View File

@@ -382,7 +382,7 @@ static void maat_fieldstat_table_row_output(struct maat_stat *stat, int perf_on)
break;
}
if (table_type == TABLE_TYPE_PLUGIN || table_type == TABLE_TYPE_VIRTUAL) {
if (table_type == TABLE_TYPE_VIRTUAL) {
continue;
}
@@ -393,6 +393,11 @@ static void maat_fieldstat_table_row_output(struct maat_stat *stat, int perf_on)
fieldstat_value_set(stat->fs_handle, stat->fs_column_id[i][COLUMN_RULE_NUM], rule_num);
total_rule_num += rule_num;
if (table_type == TABLE_TYPE_PLUGIN || table_type == TABLE_TYPE_IP_PLUGIN ||
table_type == TABLE_TYPE_BOOL_PLUGIN || table_type == TABLE_TYPE_FQDN_PLUGIN) {
continue;
}
if (table_type == TABLE_TYPE_EXPR || table_type == TABLE_TYPE_EXPR_PLUS) {
fieldstat_value_set(stat->fs_handle, stat->fs_column_id[i][COLUMN_REGEX_NUM],
regex_rule_num);