1# 2# Utility script to plot a histogram of tap latency results 3# run in iPython pylab mode using the -i flag 4# ipython --pylab 5# %run -i plothist.py 6# show() 7 8# Copy / paste data from walt.py output here 9dt_down += [32.97, 21.91, 23.06, 21.72, 67.31, 22.71, 29.52, 39.83, 38.55, 24.35, 30.14, 30.52, 38.66, 21.43, 28.69, 29.57, 21.93, 22.64, 38.77] 10dt_up += [15.86, 17.36, 15.93, 21.32, 20.16, 18.95, 14.13, 6.05, 17.58, 12.21, 13.23, 16.17, 19.14, 11.35] 11 12 13dt_down = array(dt_down) 14dt_up = array(dt_up) 15 16 17# Filter out number that are definitely garbage 18 19dt_down = dt_down[dt_down < 150] 20dt_up = dt_up[dt_up < 150] 21 22hist([dt_down, dt_up]) 23 24xlabel('tap latency [ms]') 25ylabel('Count') 26grid(True) 27legend([ 28 'tap down N=%d med=%0.1f' % (len(dt_down), median(dt_down)), 29 'tap up N=%d med=%0.1f' % (len(dt_up), median(dt_up)), 30 ]) 31title('Tap latency')