blob: c4fc5083186e9f5d83093bed773c9d8b25879a59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import commands
import datetime
# 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()
for i in range(POINTS):
value = commands.getoutput('python get_ping_rate.py')
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).total_seconds()
#print "TOOK", secs, "seconds"
commands.getoutput(
'echo %s\t%s\t%s\t%s >> series.log' % (secs, value, cpu, mem))
|