diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-04-08 14:54:06 -0400 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2016-04-08 14:54:06 -0400 |
commit | 9f5d4c8c3d40f0f9b8959afdb8bd2c80e3935829 (patch) | |
tree | 38143ccdb3bd72cb618c9c37f6cbe5e4ae14b6b9 /series-ping.py | |
parent | 02c6b0ed8843e7863de13489d53f39c032f49e5f (diff) |
fixed graphing
Diffstat (limited to 'series-ping.py')
-rw-r--r-- | series-ping.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/series-ping.py b/series-ping.py index 0993d08..c4fc508 100644 --- a/series-ping.py +++ b/series-ping.py @@ -1,7 +1,10 @@ import commands import datetime -POINTS = 100 +# How many points to measure. Make sure that you leave the baseline +# running for a significative amount before triggering the sync, it's possible +# you have significant variability in there. +POINTS = 200 start = datetime.datetime.now() @@ -10,7 +13,9 @@ for i in range(POINTS): print "Step", i, "...", value 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).seconds + secs = (now - start).total_seconds() + #print "TOOK", secs, "seconds" commands.getoutput( 'echo %s\t%s\t%s\t%s >> series.log' % (secs, value, cpu, mem)) |