Skip to content
Snippets Groups Projects
Commit 254f82c3 authored by Thomas Juerges's avatar Thomas Juerges
Browse files

L2SS-245: comment out argparse stuff, does not work

parent 3e9add26
No related branches found
No related tags found
1 merge request!96L2SS-245: "Investigation monitoring load"
...@@ -113,16 +113,15 @@ class Monitoring_Performance_Device(Device): ...@@ -113,16 +113,15 @@ class Monitoring_Performance_Device(Device):
def main(args = None, **kwargs): def main(args = None, **kwargs):
print('*{}\n*{}\n'.format(args, kwargs))
parser = ArgumentParser()
global POLLING_THREADS, ARRAY_SIZE global POLLING_THREADS, ARRAY_SIZE
parser.add_argument("--threads", "-t", dest = "threads", help = "The number of polling threads.", type = int, default = POLLING_THREADS, required = True) POLLING_THREADS = 100
parser.add_argument("--array_size", "-a", dest = "size", help = "The size of the four numpy arrays.", type = int, default = ARRAY_SIZE, required = True) ARRAY_SIZE = 200000
from sys import argv # parser = ArgumentParser()
args = argv[1:] # parser.add_argument("--threads", "-t", dest = "threads", help = "The number of polling threads.", type = int, default = POLLING_THREADS, required = True)
settings = parser.parse_known_args(args) # parser.add_argument("--array_size", "-a", dest = "size", help = "The size of the four numpy arrays.", type = int, default = ARRAY_SIZE, required = True)
POLLING_THREADS = settings['threads'] # settings = parser.parse_known_args()
ARRAY_SIZE = settings['size'] # POLLING_THREADS = settings[0].threads
# ARRAY_SIZE = settings[0].size
return run((Monitoring_Performance_Device, ), args = args, **kwargs) return run((Monitoring_Performance_Device, ), args = args, **kwargs)
if __name__ == '__main__': if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment