diff options
author | Vratko Polak <vrpolak@cisco.com> | 2021-03-29 17:54:51 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2021-03-31 15:10:31 +0000 |
commit | 7673c9d0bab49a4f13299670648420538c9303a6 (patch) | |
tree | 9aaf4eb4217351d78c73dfa5b7678555b94cdb4b | |
parent | 517286d5f25f7527bfcdcadcbdff552eebcfa4f0 (diff) |
TrafficGenerator: Less logging of unsent
When a trial has explicit stop instead of duration
(e.g. for show run), the computation of unsent packets is wrong,
so simply do not log the result.
Change-Id: I7722c85b156f92e456eda212104abdb216e78b04
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
-rw-r--r-- | resources/libraries/python/TrafficGenerator.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py index e42ad48930..a26d0fa21d 100644 --- a/resources/libraries/python/TrafficGenerator.py +++ b/resources/libraries/python/TrafficGenerator.py @@ -1307,7 +1307,8 @@ class TrafficGenerator(AbstractMeasurer): fail_count = self._loss + unsent else: raise RuntimeError(f"Unknown parsing {self.transaction_type!r}") - if unsent: + if unsent and isinstance(self._approximated_duration, float): + # Do not report unsent for "manual". logger.debug(f"Unsent packets/transactions: {unsent}") if fail_count < 0 and not self.negative_loss: fail_count = 0 |