In [1]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [2]:
boards = ['odroid', 'pi', 'dell']
pythons = ['3.4.1', '2.7.8', 'pypy-2.3.1']

In [3]:
import os

from collections import defaultdict

cpu_usage = defaultdict(dict)
controller_rw_time = defaultdict(dict)

packet = defaultdict(lambda: defaultdict(dict))

for b in boards:  
    for p in pythons:
        bp = os.path.join('res', b, p)
        
        l = eval(open(os.path.join(bp, 'robot.list')).read())
        cpu_usage[b][p] = array(l)
        
        l = eval(open(os.path.join(bp, 'dxl_controller.list')).read())
        controller_rw_time[b][p] = array(l)
        
        for s in ['serial', 'forged', 'pypot']:
            l = eval(open(os.path.join(bp, 'dxl_single', 'rw_{}.list'.format(s))).read())
            packet[s][b][p] = array(l)

In [ ]:
data = {
    'cpu_usage': dict(cpu_usage),
    'controller_rw_time': dict(controller_rw_time),
    'packet': dict(packet)
}

In [ ]:
import pickle

# get the file here: https://github.com/poppy-project/pypot/releases/download/2.4.0/data.picklewith open('data.pickle', 'wb') as f:
    pickle.dump(data, f)

In [ ]: