From: Brian Warner Date: Wed, 5 Mar 2008 04:10:52 +0000 (-0700) Subject: mutable-retrieve: only record server response times for queries that we don't ignore X-Git-Tag: allmydata-tahoe-0.9.0~66 X-Git-Url: https://git.rkrishnan.org/components/index.php?a=commitdiff_plain;h=f46cb5cd6dc0cdee6e503eb7431a74ae9e638793;p=tahoe-lafs%2Ftahoe-lafs.git mutable-retrieve: only record server response times for queries that we don't ignore --- diff --git a/src/allmydata/mutable.py b/src/allmydata/mutable.py index fceb6ab4..0cf7eed4 100644 --- a/src/allmydata/mutable.py +++ b/src/allmydata/mutable.py @@ -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()