Ejemplo n.º 1
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     STATE.update("test_name", "speedtest")
     self.child = None
     self.streams = collections.deque()
     self.finished = False
     self.state = None
Ejemplo n.º 2
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     STATE.update("test_name", "bittorrent")
     self.negotiating = True
     self.http_stream = None
     self.success = False
     self.my_side = {}
Ejemplo n.º 3
0
 def __init__(self, ctx):
     ''' Download a file '''
     self.ctx = ctx
     ClientHTTP.__init__(self, POLLER)
     self.configure(CONFIG.copy())
     logging.debug('runner_dload: GET %s', self.ctx['uri'])
     self.connect_uri(self.ctx['uri'])
Ejemplo n.º 4
0
 def connect_uri(self, uri=None, count=None):
     if not uri:
         uri = self.conf.get("speedtest.client.uri", "http://master.neubot.org/")
     if not count:
         count = self.conf.get("speedtest.client.nconn", 1)
     logging.info("* speedtest with %s", uri)
     ClientHTTP.connect_uri(self, uri, count)
Ejemplo n.º 5
0
 def __init__(self, ctx):
     """ Download a file """
     self.ctx = ctx
     ClientHTTP.__init__(self, POLLER)
     self.configure(CONFIG.copy())
     logging.info("runner_dload: connecting to %s", self.ctx["uri"])
     self.connect_uri(self.ctx["uri"])
Ejemplo n.º 6
0
 def connect_uri(self, uri=None, count=None):
     if not uri:
         uri = self.conf.get("speedtest.client.uri",
           "http://neubot.blupixel.net/")
     if not count:
         count = self.conf.get("speedtest.client.nconn", 1)
     LOG.info("* speedtest with %s" % uri)
     ClientHTTP.connect_uri(self, uri, count)
Ejemplo n.º 7
0
    def connect_uri(self, uri=None, count=None):
        if not uri:
            address = self.conf["bittorrent.address"]
            port = self.conf["bittorrent.negotiate.port"]
            uri = "http://%s:%s/" % (address, port)

        LOG.start("BitTorrent: connecting to %s" % uri)

        ClientHTTP.connect_uri(self, uri, 1)
Ejemplo n.º 8
0
    def connect_uri(self, uri=None, count=None):
        if not uri:
            address = self.conf["bittorrent.address"]
            port = self.conf["bittorrent.negotiate.port"]
            uri = "http://%s:%s/" % (address, port)

        logging.info("BitTorrent: connecting to %s in progress...", uri)

        ClientHTTP.connect_uri(self, uri, 1)
Ejemplo n.º 9
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     STATE.update("test_latency", "---", publish=False)
     STATE.update("test_download", "---", publish=False)
     STATE.update("test_upload", "---", publish=False)
     STATE.update("test_name", "speedtest")
     self.child = None
     self.streams = collections.deque()
     self.finished = False
     self.state = None
Ejemplo n.º 10
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     STATE.update("test_latency", "---", publish=False)
     STATE.update("test_download", "---", publish=False)
     STATE.update("test_upload", "---", publish=False)
     STATE.update("test_name", "bittorrent")
     self.negotiating = True
     self.http_stream = None
     self.success = False
     self.my_side = {}
Ejemplo n.º 11
0
    def connect_uri(self, uri=None, count=None):
        self._task = None

        if not uri:
            uri = "http://%s:9773/rendezvous" % CONFIG["agent.master"]

        LOG.start("* Rendezvous with %s" % uri)
        STATE.update("rendezvous")

        # We need to make just one connection
        ClientHTTP.connect_uri(self, uri, 1)
Ejemplo n.º 12
0
    def connect_uri(self, uri=None, count=None):
        self._task = None

        if not privacy.allowed_to_run():
            _open_browser_on_windows("privacy.html")
            privacy.complain()
            self._schedule()
            return

        if not uri:
            uri = "http://%s:9773/rendezvous" % CONFIG["agent.master"]

        LOG.start("* Rendezvous with %s" % uri)
        STATE.update("rendezvous")

        # We need to make just one connection
        ClientHTTP.connect_uri(self, uri, 1)
Ejemplo n.º 13
0
    def __init__(self, poller, parent, rates):
        ClientHTTP.__init__(self, poller)
        self.parent = parent
        self.rates = rates

        STATE.update("test_latency", "---", publish=False)
        STATE.update("test_download", "---", publish=False)
        STATE.update("test_upload", "N/A", publish=False)
        STATE.update("test_progress", "0%", publish=False)
        STATE.update("test_name", "dash", publish=False)
        STATE.update("test")

        self.iteration = 0
        self.rate_kbit = 0
        self.speed_kbit = 100
        self.saved_ticks = 0.0
        self.saved_cnt = 0
        self.saved_times = 0
Ejemplo n.º 14
0
    def __init__(self, poller):
        ClientHTTP.__init__(self, poller)

        STATE.update("test_latency", "---", publish=False)
        STATE.update("test_download", "---", publish=False)
        STATE.update("test_upload", "---", publish=False)
        STATE.update("test_progress", "0%", publish=False)
        STATE.update("test_name", "dash")

        self.state = STATE_NEGOTIATE

        self.stream = None
        self.measurements = []
        self.client = None

        self.authorization = ""
        self.real_address = ""
        self.queue_pos = 0
        self.unchoked = False

        self.iterations = 0
Ejemplo n.º 15
0
 def configure(self, conf):
     ClientHTTP.configure(self, conf)
Ejemplo n.º 16
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     self._interval = 0
     self._task = None
Ejemplo n.º 17
0
 def connect(self, endpoint, count=1):
     if count != 1:
         raise RuntimeError("dash: invalid count")
     logging.info("dash: negotiate with: %s",
         utils_net.format_epnt(endpoint))
     ClientHTTP.connect(self, endpoint, count)
Ejemplo n.º 18
0
 def configure(self, conf, measurer=None):
     if measurer:
         LOG.info("* speedtest: ignoring upstream measurer")
     ClientHTTP.configure(self, conf, self.measurer)
Ejemplo n.º 19
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     self.ticks = {}
     self.bytes = {}
Ejemplo n.º 20
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     self.timestamp = 0
     self.uri = ""
     self.stop = False