code: def bench(host, port, uri, method, headers, body, verbocity, http_version, protocol):
      
      t1 = time.time()
      s = create_connction(host, port, protocol)
      t2 = time.time()
  
      msg = "%s %s HTTP/%s\r\n" % (method, uri, http_version)
      if body:
          body='%s\r\n' % body
          msg += "Content-length: %s\r\n" % len(body)
      msg += headers
      msg += "\r\n"
      msg += "\r\n"
      msg += body
      if verbocity:
          print msg
      res = ''
      t3 = time.time()
      data = communicate(s, msg)
      if verbocity:
          if 'gzip' in data:
              data = data.split("\r\n\r\n", 1)
              print data[0]
              print
              print data[1]
          else:
              print data
      t4 = time.time()
      res += "%s,%s,ms,%s,ms,%s,ms\n" % (host, round((t4 - t1) * 1000.0, 3),
                                         round((t2 - t1) * 1000.0, 3),
                                         round((t4 - t3) * 1000.0, 3))
      s.close()
      return res
docs: The benchmark method
      :param host str: - host to run tests agains
      :param port int: - port to connect
      :param uri str: - URI to send in message
      :param method str: - http method
      :param headers str: - formatted headers for message
      :param body str: - body of message
      :param verbocity int [0-1]: - print extended output option
      :param http_version str: - represetation of http protocol
      :return
          [list] results of benchmark: