]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
profile: account flow-worker tcp-prune step
authorVictor Julien <victor@inliniac.net>
Fri, 3 Mar 2017 08:08:23 +0000 (09:08 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 20 Apr 2017 15:41:11 +0000 (17:41 +0200)
src/flow-worker.c
src/flow-worker.h

index b29486e3359ea9281fa4e6160a4ab3cb6ac11049..8e2effcc1ea4f213bf2c68a5695f74f15713dd79 100644 (file)
@@ -258,8 +258,10 @@ TmEcode FlowWorker(ThreadVars *tv, Packet *p, void *data, PacketQueue *preq, Pac
 
     /*  Release tcp segments. Done here after alerting can use them. */
     if (p->flow != NULL && p->proto == IPPROTO_TCP) {
+        FLOWWORKER_PROFILING_START(p, PROFILE_FLOWWORKER_TCPPRUNE);
         StreamTcpPruneSession(p->flow, p->flowflags & FLOW_PKT_TOSERVER ?
                 STREAM_TOSERVER : STREAM_TOCLIENT);
+        FLOWWORKER_PROFILING_END(p, PROFILE_FLOWWORKER_TCPPRUNE);
     }
 
     if (p->flow) {
@@ -295,6 +297,8 @@ const char *ProfileFlowWorkerIdToString(enum ProfileFlowWorkerId fwi)
             return "app-layer";
         case PROFILE_FLOWWORKER_DETECT:
             return "detect";
+        case PROFILE_FLOWWORKER_TCPPRUNE:
+            return "tcp-prune";
         case PROFILE_FLOWWORKER_SIZE:
             return "size";
     }
index 418ea05d6ca864c609f337212067166a34de7e9f..2fc6d643287e19ed8bea0c468d547a15c84d7015 100644 (file)
@@ -23,6 +23,7 @@ enum ProfileFlowWorkerId {
     PROFILE_FLOWWORKER_STREAM,
     PROFILE_FLOWWORKER_APPLAYERUDP,
     PROFILE_FLOWWORKER_DETECT,
+    PROFILE_FLOWWORKER_TCPPRUNE,
     PROFILE_FLOWWORKER_SIZE
 };
 const char *ProfileFlowWorkerIdToString(enum ProfileFlowWorkerId fwi);