def payload_for_measurements(measurements)
      table = build_string_table(measurements)
      payload = []
      payload.push(table.length)
      strings = table.keys.sort
      payload.concat(strings)
      measurements.each { |m| append_measurement(payload, table, m) }
      payload
    end
def payload_for_measurements(measurements)
      table = build_string_table(measurements)
      payload = []
      payload.push(table.length)
      strings = table.keys.sort
      payload.concat(strings)
      measurements.each { |m| append_measurement(payload, table, m) }
      payload
    end
Generate a payload from the list of measurements
 The payload is an array, with the number of elements in the string table
 The string table, and measurements