Esempio 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
Esempio 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 = {}
Esempio 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'])
Esempio 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)
Esempio 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"])
Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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
Esempio 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 = {}
Esempio 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)
Esempio 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)
Esempio 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
Esempio 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
Esempio n. 15
0
 def configure(self, conf):
     ClientHTTP.configure(self, conf)
Esempio n. 16
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     self._interval = 0
     self._task = None
Esempio 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)
Esempio n. 18
0
 def configure(self, conf, measurer=None):
     if measurer:
         LOG.info("* speedtest: ignoring upstream measurer")
     ClientHTTP.configure(self, conf, self.measurer)
Esempio n. 19
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     self.ticks = {}
     self.bytes = {}
Esempio n. 20
0
 def __init__(self, poller):
     ClientHTTP.__init__(self, poller)
     self.timestamp = 0
     self.uri = ""
     self.stop = False