From f46cb5cd6dc0cdee6e503eb7431a74ae9e638793 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 4 Mar 2008 21:10:52 -0700 Subject: [PATCH] mutable-retrieve: only record server response times for queries that we don't ignore --- src/allmydata/mutable.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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() -- 2.45.2