适配调用IOscan的Rulescan。

This commit is contained in:
zhengchao
2016-06-08 11:16:45 +08:00
parent a591c06b2f
commit 17491f10e4
3 changed files with 23 additions and 14 deletions

View File

@@ -434,7 +434,9 @@ Maat_feather_t Maat_feather(int max_thread_num,const char* table_info_path,void*
feather->garbage_q=MESA_lqueue_create(0,0);
feather->effect_interval_ms=60*1000;
feather->scan_interval_ms=1*1000;
feather->rule_scan_type=2;
//Prepare for comptetion,return no hit detail as default for temporary.
feather->rule_scan_type=0;
//feather->rule_scan_type=2;
feather->thread_call_cnt=aligment_int64_array_alloc(max_thread_num);
feather->outer_mid_cnt=aligment_int64_array_alloc(max_thread_num);
feather->inner_mid_cnt=aligment_int64_array_alloc(max_thread_num);

View File

@@ -26,7 +26,7 @@
#include "mesa_fuzzy.h"
#include "great_index_engine.h"
int MAAT_FRAME_VERSION_1_8_20160603=1;
int MAAT_FRAME_VERSION_1_8_20160607_PERF_TEST=1;
const char *maat_module="MAAT Frame";
const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin",
@@ -880,7 +880,12 @@ struct _Maat_scanner_t* create_maat_scanner(unsigned int version,int scan_thread
scanner->ref_cnt=aligment_int64_array_alloc(scan_thread_num);
scanner->region_update_q=MESA_lqueue_create(0,0);
scanner->region=rulescan_initialize(scan_thread_num);
rulescan_set_param(scanner->region,rs_scan_type);
//For best performance test:
//1.Do NOT set this option,rulescan return no hit detail as default;
//2.Set all STR rule to QUICK;
//rulescan_set_param(scanner->region,RULESCAN_DETAIL_RESULT,);
rulescan_set_param(scanner->region,RULESCAN_QUICK_SUBTYPE,NULL,0);
scanner->tomb_ref=tomb;
scanner->region_rslt_buff=(scan_result_t*)malloc(sizeof(scan_result_t)*MAX_SCANNER_HIT_NUM*scan_thread_num);