From b1a4e6debcfa5ec54c9d8eecae897aaf42ad9363 Mon Sep 17 00:00:00 2001
From: Thomas Juerges <203795-tjuerges@users.noreply.gitlab.com>
Date: Wed, 21 Jul 2021 17:20:07 +0200
Subject: [PATCH] L2SS-245: do not use argparse and log more stuff

---
 .../devices/monitoring_performance_test.py    | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/devices/test/devices/monitoring_performance_test.py b/devices/test/devices/monitoring_performance_test.py
index e17b93a8e..3284a4eba 100644
--- a/devices/test/devices/monitoring_performance_test.py
+++ b/devices/test/devices/monitoring_performance_test.py
@@ -16,19 +16,19 @@ sys.path.append(parentdir)
 
 import time
 import numpy
-from argparse import ArgumentParser
 from tango import DevState, Util
 from tango.server import run, Device, attribute
 from numpy import random
 
 __all__ = ["Monitoring_Performance_Device", "main"]
 
-POLLING_THREADS = 10
-ARRAY_SIZE = 10000
+POLLING_THREADS = 100
+ARRAY_SIZE = 2000000
 
 class Monitoring_Performance_Device(Device):
+    global ARRAY_SIZE
     def read_array(self):
-        print("{} read_big".format(time.time()))
+        print("{} {} read_big".format(time.time(), self.get_name()))
         return numpy.array([random.random(), ] * ARRAY_SIZE)
 
     array1_r = attribute(
@@ -110,18 +110,9 @@ class Monitoring_Performance_Device(Device):
 
     def delete_device(self):
         self.set_state(DevState.OFF)
-
+0.0741395
 
 def main(args = None, **kwargs):
-    global POLLING_THREADS, ARRAY_SIZE
-    POLLING_THREADS = 100
-    ARRAY_SIZE = 200000
-    # parser = ArgumentParser()
-    # parser.add_argument("--threads", "-t", dest = "threads", help = "The number of polling threads.", type = int, default = POLLING_THREADS, required = True)
-    # parser.add_argument("--array_size", "-a", dest = "size", help = "The size of the four numpy arrays.", type = int, default = ARRAY_SIZE, required = True)
-    # settings = parser.parse_known_args()
-    # POLLING_THREADS = settings[0].threads
-    # ARRAY_SIZE = settings[0].size
     return run((Monitoring_Performance_Device, ), args = args, **kwargs)
 
 if __name__ == '__main__':
-- 
GitLab