blob: 0993d087b8a7257e6e988cb7938ccdd1da88d741 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import commands
import datetime
POINTS = 100
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()
now = datetime.datetime.now()
secs = (now - start).seconds
commands.getoutput(
'echo %s\t%s\t%s\t%s >> series.log' % (secs, value, cpu, mem))
|