hsbench: add CSV dump support

This commit is contained in:
Wang Xiang W
2020-04-30 07:37:55 -04:00
committed by Konstantinos Margaritis
parent 87413fbff0
commit 7d21fc157c
8 changed files with 82 additions and 2 deletions

View File

@@ -276,6 +276,17 @@ void EngineHyperscan::printStats() const {
#endif
}
void EngineHyperscan::printCsvStats() const {
printf(",\"%s\"", compile_stats.signatures.c_str());
printf(",\"%zu\"", compile_stats.expressionCount);
printf(",\"0x%x\"", compile_stats.crc32);
printf(",\"%zu\"", compile_stats.compiledSize);
printf(",\"%zu\"", compile_stats.streamSize);
printf(",\"%zu\"", compile_stats.scratchSize);
printf(",\"%0.3Lf\"", compile_stats.compileSecs);
printf(",\"%u\"", compile_stats.peakMemorySize);
}
void EngineHyperscan::sqlStats(SqlDB &sqldb) const {
ostringstream crc;
crc << "0x" << hex << compile_stats.crc32;