aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2020-11-04 10:27:16 +0100
committerVratko Polak <vrpolak@cisco.com>2020-11-10 16:28:46 +0000
commit4a0e9d0d93f3b14d4715557e299182c4f6c79f42 (patch)
tree3faa10dd217d163e75d2bae2b8b0cb5ac3f83aad /resources
parentb27a8ed46df70050866a311f35ff710dc82a9f55 (diff)
TCP CPS: Count NAT sessions
The previous code counted full TCP connections, which need one more packet, leading to worse results. Change-Id: Ifcf78356b6ed54819ea0bf5aa069d7d9cb951183 Signed-off-by: Vratko Polak <vrpolak@cisco.com> (cherry picked from commit b71112bc323b55e39d8a9992a46530e1eb7f6f58) (cherry picked from commit 5f97857299cc027fe36ddebfe234c514ec94b0f7)
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/TrafficGenerator.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py
index adc95bf252..cd100da028 100644
--- a/resources/libraries/python/TrafficGenerator.py
+++ b/resources/libraries/python/TrafficGenerator.py
@@ -1091,8 +1091,10 @@ class TrafficGenerator(AbstractMeasurer):
partial_attempt_count = ctca
# We do not care whether TG is slow, it should have attempted all.
expected_attempt_count = self.transaction_scale
- # TODO: Is there a better packet-based counter?
- pass_count = self._l7_data[u"server"][u"tcp"][u"connects"]
+ # From TCP point of view, server/connects counts full connections,
+ # but we are testing NAT session so client/connects counts that
+ # (half connections from TCP point of view).
+ pass_count = self._l7_data[u"client"][u"tcp"][u"connects"]
fail_count = expected_attempt_count - pass_count
elif self.transaction_type == u"udp_pps":
if not self.transaction_scale: