]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
profiling: use wider columns in keyword output
authorVictor Julien <victor@inliniac.net>
Mon, 2 Jun 2014 14:46:02 +0000 (16:46 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 2 Jun 2014 14:46:02 +0000 (16:46 +0200)
Use wider columns in keyword output so that even on high end sensors
the stats tables remain readable.

src/util-profiling-keywords.c

index caa128e5a933a8edd701134fe10df0865303a30b..4a6bd661f9380e3d2b9f583f1b7f6f328a785612 100644 (file)
@@ -102,19 +102,21 @@ void SCProfilingKeywordsGlobalInit(void) {
 void DoDump(SCProfileKeywordDetectCtx *rules_ctx, FILE *fp, const char *name) {
     int i;
     fprintf(fp, "  ----------------------------------------------"
+            "------------------------------------------------------"
             "----------------------------\n");
     fprintf(fp, "  Stats for: %s\n", name);
     fprintf(fp, "  ----------------------------------------------"
+            "------------------------------------------------------"
             "----------------------------\n");
-    fprintf(fp, "  %-16s %-11s %-8s %-8s %-11s %-11s %-11s %-11s\n", "Keyword", "Ticks", "Checks", "Matches", "Max Ticks", "Avg", "Avg Match", "Avg No Match");
+    fprintf(fp, "  %-16s %-15s %-15s %-15s %-15s %-15s %-15s %-15s\n", "Keyword", "Ticks", "Checks", "Matches", "Max Ticks", "Avg", "Avg Match", "Avg No Match");
     fprintf(fp, "  ---------------- "
-                "----------- "
-                "-------- "
-                "-------- "
-                "----------- "
-                "----------- "
-                "----------- "
-                "----------- "
+                "--------------- "
+                "--------------- "
+                "--------------- "
+                "--------------- "
+                "--------------- "
+                "--------------- "
+                "--------------- "
         "\n");
     for (i = 0; i < DETECT_TBLSIZE; i++) {
         SCProfileKeywordData *d = &rules_ctx->data[i];
@@ -135,7 +137,7 @@ void DoDump(SCProfileKeywordDetectCtx *rules_ctx, FILE *fp, const char *name) {
         }
 
         fprintf(fp,
-            "  %-16s %-11"PRIu64" %-8"PRIu64" %-8"PRIu64" %-11"PRIu64" %-11.2f %-11.2f %-11.2f\n",
+            "  %-16s %-15"PRIu64" %-15"PRIu64" %-15"PRIu64" %-15"PRIu64" %-15.2f %-15.2f %-15.2f\n",
             sigmatch_table[i].name,
             ticks,
             d->checks,
@@ -176,6 +178,7 @@ SCProfilingKeywordDump(DetectEngineCtx *de_ctx) {
     }
 
     fprintf(fp, "  ----------------------------------------------"
+            "------------------------------------------------------"
             "----------------------------\n");
     fprintf(fp, "  Date: %" PRId32 "/%" PRId32 "/%04d -- "
             "%02d:%02d:%02d\n", tms->tm_mon + 1, tms->tm_mday, tms->tm_year + 1900,