         @current = null
         @sending = false
 
+        @bytesPerSec = 0
+        @speedo = setInterval =>
+          do @checkBytes
+        , 1000
+        @previousRun = Date.now()
+        @roundTrips = 0
+        @latestRoundTrip = null
+        @roundTripTotal = 0
+
         @options = options || {}
         @options.wait = 0 if not @options.wait
 
+    checkBytes: ->
+        unless @bytesPerSec
+          @previousRun = Date.now()
+          return
+        elapsed = (Date.now() - @previousRun) / 1000
+        return unless elapsed
+        perSec = Math.ceil @bytesPerSec / elapsed
+        console.log "MICROFLO #{@options.type}: buffered #{@bytesPerSec} at #{perSec}/sec. Time elapsed: #{Math.ceil(elapsed)}s. #{@queue.length} commands in buffer" if debug_send
+        @bytesPerSec = 0
+        @previousRun = Date.now()
+        return unless @roundTrips
+        console.log "MICROFLO #{@options.type}: made #{@roundTrips} round-trips at average #{Math.ceil(@roundTripTotal / @roundTrips)}ms each. Latest took #{Math.ceil(@latestRoundTrip)}ms" if debug_send
 
     write: (chunk, callback) ->
         throw new Error 'SendQueue.write must be implemented by consumer'
 
     push: (buffer, callback) ->
-        # console.log 'queuing buf', buffer, @sending
+        console.log 'queuing buf', buffer, @queue.length, @sending if debug_comms
+
+        @bytesPerSec += buffer.length
+
         @queue.push
             data: buffer
             callback: callback

class CommandAccumulator extends EventEmitter
    constructor: (commandSize) ->
        @commandSize = commandSize
        @buffer = new commandstream.Buffer(commandstream.cmdFormat.commandSize*100);
        @offset = 0

    onData: (da) ->

                # Done sending, now waiting for response
                # FIXME: error if this times out
                return
            @current.sent = Date.now()
            @write chunk, () =>
                console.log 'MICROFLO SEND:', chunkSize, chunk if debug_comms
                if index < dataBuf.length
                    sendCmd dataBuf, index+=chunkSize

        sendCmd @current.data, 0 if @current?

    onResponse: (type) ->
        return if not @sending
