mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-30 11:44:28 +03:00
Windows porting: port hyperscan and chimera tools to windows.
This commit is contained in:
@@ -26,6 +26,9 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#define PCRE_STATIC
|
||||
#endif
|
||||
#include "config.h"
|
||||
|
||||
#include "common.h"
|
||||
@@ -38,6 +41,8 @@
|
||||
#include "util/make_unique.h"
|
||||
#include "util/unicode_def.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
|
||||
EnginePCREContext::EnginePCREContext(int capture_cnt) {
|
||||
@@ -207,11 +212,19 @@ void EnginePCRE::printStats() const {
|
||||
}
|
||||
printf("Signatures: %s\n", compile_stats.signatures.c_str());
|
||||
printf("PCRE info: %s\n", compile_stats.db_info.c_str());
|
||||
#ifndef _WIN32
|
||||
printf("Expression count: %'zu\n", compile_stats.expressionCount);
|
||||
printf("Bytecode size: %'zu bytes\n", compile_stats.compiledSize);
|
||||
printf("Scratch size: %'zu bytes\n", compile_stats.scratchSize);
|
||||
printf("Compile time: %'0.3Lf seconds\n", compile_stats.compileSecs);
|
||||
printf("Peak heap usage: %'u bytes\n", compile_stats.peakMemorySize);
|
||||
#else
|
||||
printf("Expression count: %zu\n", compile_stats.expressionCount);
|
||||
printf("Bytecode size: %zu bytes\n", compile_stats.compiledSize);
|
||||
printf("Scratch size: %zu bytes\n", compile_stats.scratchSize);
|
||||
printf("Compile time: %0.3Lf seconds\n", compile_stats.compileSecs);
|
||||
printf("Peak heap usage: %u bytes\n", compile_stats.peakMemorySize);
|
||||
#endif
|
||||
}
|
||||
|
||||
void EnginePCRE::sqlStats(SqlDB &sqldb) const {
|
||||
|
Reference in New Issue
Block a user