graph cpu/mem too
authorKali Kaneko (leap communications) <kali@leap.se>
Sun, 10 Apr 2016 23:00:23 +0000 (19:00 -0400)
committerKali Kaneko (leap communications) <kali@leap.se>
Sun, 10 Apr 2016 23:00:23 +0000 (19:00 -0400)
Makefile
graphit
measure-perf-series.py [moved from series-ping.py with 69% similarity]

index e943803..606b55a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ measure-series:
        # TODO add cpu/ram usage (ping command COULD RETURN THAT!)
        rm -f /tmp/soledadsync/*
        rm -f series.log
-       python series-ping.py
+       python measure-perf-series.py
 
 graph-series:
        data=series.log ./graphit
diff --git a/graphit b/graphit
index f40ab2e..250b99e 100755 (executable)
--- a/graphit
+++ b/graphit
@@ -4,5 +4,6 @@ filename=system("echo $data")
 set title filename
 set key outside
 #plot name  with linespoints notitle
-plot for [col=1:3] filename using 0:col with lines notitle
+#plot filename using 1:2 with linespoints title columnheader
+plot for [col=2:4] filename using 1:col with lines title columnheader
 pause -1 
similarity index 69%
rename from series-ping.py
rename to measure-perf-series.py
index dd6277d..24e9d5f 100644 (file)
@@ -12,13 +12,13 @@ for i in range(POINTS):
     value = commands.getoutput('python get_ping_rate.py')
     print "Step", i, "...", value
     # TODO --- cpu/mem too brittle.
-    #cpu_mem = commands.getoutput('python get-client-cpu-mem.py')
-    #cpu, mem = cpu_mem.split()
-    #print "CPU/MEM", cpu, mem
+    cpu_mem = commands.getoutput('python get-client-cpu-mem.py')
+    cpu, mem = cpu_mem.split()
+    print "CPU/MEM", cpu, mem
     now = datetime.datetime.now()
     secs = (now - start).total_seconds()
     #print "TOOK", secs, "seconds"
     commands.getoutput(
-        'echo %s\t%s >> series.log' % (secs, value))
-    #'echo %s\t%s\t%s\t%s >> series.log' % (secs, value))
+        #'echo %s\t%s >> series.log' % (secs, value))
+        'echo %s\t%s\t%s\t%s >> series.log' % (secs, value, cpu, mem))
     #, cpu, mem))