summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-04-10 19:00:23 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-04-10 19:00:23 -0400
commitd7e02ebd152cde198654c306792fe44ff8bf6b90 (patch)
treed092a6fc9638bc629d4721ff4bb2eebdc9f92e2c
parentd2a5752b6ed0048216ead3d53e694bb8b84b6e34 (diff)
graph cpu/mem too
-rw-r--r--Makefile2
-rwxr-xr-xgraphit3
-rw-r--r--measure-perf-series.py (renamed from series-ping.py)10
3 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index e943803..606b55a 100644
--- 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
--- 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
diff --git a/series-ping.py b/measure-perf-series.py
index dd6277d..24e9d5f 100644
--- a/series-ping.py
+++ b/measure-perf-series.py
@@ -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))