Change in osmo-gsm-tester[master]: iperf3: add getter to read the actual run time of an iperf client run

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Jun 25 13:53:52 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18866 )

Change subject: iperf3: add getter to read the actual run time of an iperf client run
......................................................................

iperf3: add getter to read the actual run time of an iperf client run

this is helpful to run some action for the exact run time of an iperf3
session. note that if no time spec is given when calling
"prepare_test_proc()", a modifier could set the runtime of an DL experiment
to an arbitrary value so we need to have a mechanism to read
the actual time from within a test

Change-Id: I484a0add322ffd269a1e9df72a00cf348950b268
---
M src/osmo_gsm_tester/obj/iperf3.py
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



diff --git a/src/osmo_gsm_tester/obj/iperf3.py b/src/osmo_gsm_tester/obj/iperf3.py
index 4ccbf42..e0e05d8 100644
--- a/src/osmo_gsm_tester/obj/iperf3.py
+++ b/src/osmo_gsm_tester/obj/iperf3.py
@@ -209,6 +209,7 @@
         self.server = iperf3srv
         self.testenv = testenv
         self._proto = None
+        self._time_sec = None
         self.log_file = None
         self.rem_host = None
         self.remote_log_file = None
@@ -237,6 +238,7 @@
             else:
                 time_sec = int(time_sec_str)
         assert(time_sec)
+        self._time_sec = time_sec
 
         if proto is None:
             proto = values.get('protocol', IPerf3Client.PROTO_TCP)
@@ -324,6 +326,9 @@
     def proto(self):
         return self._proto
 
+    def time_sec(self):
+        return self._time_sec
+
     def __str__(self):
         # FIXME: somehow differentiate between several clients connected to same server?
         return "%s:%u" %(self.server.addr(), self.server.port())

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18866
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I484a0add322ffd269a1e9df72a00cf348950b268
Gerrit-Change-Number: 18866
Gerrit-PatchSet: 2
Gerrit-Owner: srs_andre <andre at softwareradiosystems.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200625/21027aaf/attachment.htm>


More information about the gerrit-log mailing list