def rate_test(device):
    """
    Tests how many integers per second can be transmitted
    """
    print('reading 10000 values...')
    numFrames = 10000
    vals = []
    for _ in range(numFrames):
        vals.append(device.axis0.loop_counter)
    loopsPerFrame = (vals[-1] - vals[0]) / numFrames
    loopsPerSec = 168000000 / (2 * 10192)
    FramePerSec = loopsPerSec / loopsPerFrame
    print('Frames per second: ' + str(FramePerSec))
