aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester
diff options
context:
space:
mode:
authorAndre Puschmann <andre@softwareradiosystems.com>2020-06-16 16:06:30 +0200
committerAndre Puschmann <andre@softwareradiosystems.com>2020-06-23 16:41:00 +0200
commit219ec75aa976a322558b43c20f7459104dea7c15 (patch)
treed61edf31a3487aaec7b3517226ace22ee7fe1870 /src/osmo_gsm_tester
parent14bb5ff9de6eac1825fbd4b87be80b37c376f065 (diff)
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
Diffstat (limited to 'src/osmo_gsm_tester')
-rw-r--r--src/osmo_gsm_tester/obj/iperf3.py5
1 files changed, 5 insertions, 0 deletions
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 @@ class IPerf3Client(log.Origin):
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 @@ class IPerf3Client(log.Origin):
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 @@ class IPerf3Client(log.Origin):
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())