From 6e9c55289a3a2ce4392253abd9798b50bfa9f291 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Wed, 11 May 2016 10:23:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8maat=5Fstat=E4=B8=AD=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=B4=AF=E7=A7=AF=E6=89=AB=E6=8F=8F=E5=AD=97=E8=8A=82=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E6=AC=A1=E6=95=B0=E7=9A=84=E7=BB=9F=E8=AE=A1=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entry/Maat_rule.cpp | 2 +- src/entry/Maat_stat.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index 503be8f..ac03bec 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -26,7 +26,7 @@ #include "mesa_fuzzy.h" #include "great_index_engine.h" -int MAAT_FRAME_VERSION_1_7_20160509=1; +int MAAT_FRAME_VERSION_1_7_20160510=1; const char *maat_module="MAAT Frame"; const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin", diff --git a/src/entry/Maat_stat.cpp b/src/entry/Maat_stat.cpp index 1f4090d..6a32535 100644 --- a/src/entry/Maat_stat.cpp +++ b/src/entry/Maat_stat.cpp @@ -9,6 +9,8 @@ enum MAAT_FS_STATUS{ STATUS_OUTER_MID_NUM, STATUS_INNER_MID_NUM, STATUS_GARBAGE_QSIZE, + STATUS_TOTAL_SCAN_LEN, + STATUS_TOTAL_SCAN_CNT, }; enum MAAT_FS_COLUMN @@ -19,7 +21,7 @@ enum MAAT_FS_COLUMN COLUMN_TABLE_SCAN_CNT, COLUMN_TABLE_SCAN_BYTES, COLUMN_TABLE_CPU_TIME,//microseconds - COLUMN_TABLE_HIT_CNT + COLUMN_TABLE_HIT_CNT, }; void maat_stat_init(struct _Maat_feather_t* feather) { @@ -40,6 +42,9 @@ void maat_stat_init(struct _Maat_feather_t* feather) feather->fs_status_id[STATUS_OUTER_MID_NUM]=FS_register(feather->stat_handle, FS_STYLE_STATUS, FS_CALC_CURRENT,"outer_mid"); feather->fs_status_id[STATUS_INNER_MID_NUM]=FS_register(feather->stat_handle, FS_STYLE_STATUS, FS_CALC_CURRENT,"inner_mid"); feather->fs_status_id[STATUS_GARBAGE_QSIZE]=FS_register(feather->stat_handle, FS_STYLE_STATUS, FS_CALC_CURRENT,"garbage_num"); + feather->fs_status_id[STATUS_TOTAL_SCAN_LEN]=FS_register(feather->stat_handle, FS_STYLE_STATUS, FS_CALC_CURRENT,"scan_bytes"); + feather->fs_status_id[STATUS_TOTAL_SCAN_CNT]=FS_register(feather->stat_handle, FS_STYLE_STATUS, FS_CALC_CURRENT,"scan_times"); + feather->fs_column_id[COLUMN_TABLE_RULE_NUM]=FS_register(feather->stat_handle, FS_STYLE_COLUMN, FS_CALC_CURRENT,"rule"); feather->fs_column_id[COLUMN_TABLE_REGEX_NUM]=FS_register(feather->stat_handle, FS_STYLE_COLUMN, FS_CALC_CURRENT,"regex"); @@ -240,6 +245,8 @@ void maat_stat_output(struct _Maat_feather_t* feather) total_hit_cnt); feather->total_scan_bytes=total_input_bytes; feather->total_scan_cnt=total_scan_cnt; + FS_operate(feather->stat_handle, feather->fs_status_id[STATUS_TOTAL_SCAN_LEN], 0,FS_OP_SET,feather->total_scan_bytes); + FS_operate(feather->stat_handle, feather->fs_status_id[STATUS_TOTAL_SCAN_CNT], 0,FS_OP_SET,feather->total_scan_cnt); FS_passive_output(feather->stat_handle); return; }