]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
mutable-retrieve: only record server response times for queries that we don't ignore
authorBrian Warner <warner@allmydata.com>
Wed, 5 Mar 2008 04:10:52 +0000 (21:10 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 5 Mar 2008 04:10:52 +0000 (21:10 -0700)
src/allmydata/mutable.py

index fceb6ab4bcbe4544e6b364f5b78591112fd458cc..0cf7eed4c16a214a6a58eb7a059a4efd92fe9be6 100644 (file)
@@ -471,15 +471,16 @@ class Retrieve:
         return verifier
 
     def _got_results(self, datavs, peerid, readsize, stuff, started):
-        elapsed = time.time() - started
-        if peerid not in self._status.timings["fetch_per_server"]:
-            self._status.timings["fetch_per_server"][peerid] = []
-        self._status.timings["fetch_per_server"][peerid].append(elapsed)
         self._queries_outstanding.discard(peerid)
         self._used_peers.add(peerid)
         if not self._running:
             return
 
+        elapsed = time.time() - started
+        if peerid not in self._status.timings["fetch_per_server"]:
+            self._status.timings["fetch_per_server"][peerid] = []
+        self._status.timings["fetch_per_server"][peerid].append(elapsed)
+
         if peerid not in self._status.sharemap:
             self._status.sharemap[peerid] = set()