perf-monitor: print load avg

This commit is contained in:
Bastian Bloessl
2017-04-20 16:46:46 +02:00
parent 5ff9e43532
commit 2ba97c8d6d
+5 -1
View File
@@ -20,6 +20,7 @@
import sys, time import sys, time
from gnuradio import gr, ctrlport from gnuradio import gr, ctrlport
from subprocess import Popen, PIPE
class MyApp(object): class MyApp(object):
def __init__(self, args): def __init__(self, args):
@@ -63,7 +64,7 @@ class MyApp(object):
client.setKnobs(knobs) client.setKnobs(knobs)
# let the flow graph run for some time # let the flow graph run for some time
time.sleep(30) time.sleep(60)
## get work time for all blocks ## get work time for all blocks
kl = map(lambda x: "%s::total work time" % x, blocks) kl = map(lambda x: "%s::total work time" % x, blocks)
@@ -75,4 +76,7 @@ class MyApp(object):
print(",".join(map(lambda x: str(x[1]), sorted(work_times.items())))) print(",".join(map(lambda x: str(x[1]), sorted(work_times.items()))))
p = Popen("uptime", stdout=PIPE, close_fds=True, shell=True)
print(p.stdout.read())
MyApp(sys.argv) MyApp(sys.argv)