From: Brian Warner Date: Mon, 28 Apr 2008 20:27:55 +0000 (-0700) Subject: offloaded: add 'resumes' counter to stats: how many upload requests are resuming... X-Git-Tag: allmydata-tahoe-1.1.0~177 X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=351a7f4632ae97d21ec1e421259070b7348cc828;p=tahoe-lafs%2Ftahoe-lafs.git offloaded: add 'resumes' counter to stats: how many upload requests are resuming an interrupted upload? --- diff --git a/src/allmydata/offloaded.py b/src/allmydata/offloaded.py index 1448e392..d4c94a1a 100644 --- a/src/allmydata/offloaded.py +++ b/src/allmydata/offloaded.py @@ -321,6 +321,7 @@ class CHKCiphertextFetcher(AskUntilSuccessMixin): # then find out how much crypttext we have on disk if os.path.exists(self._incoming_file): self._have = os.stat(self._incoming_file)[stat.ST_SIZE] + self._upload_helper._helper.count("chk_upload_helper.resumes") self.log("we already have %d bytes" % self._have, level=log.NOISY) else: self._have = 0 @@ -499,6 +500,7 @@ class Helper(Referenceable, service.MultiService): self._counters = {"chk_upload_helper.upload_requests": 0, "chk_upload_helper.upload_already_present": 0, "chk_upload_helper.upload_need_upload": 0, + "chk_upload_helper.resumes": 0, "chk_upload_helper.fetched_bytes": 0, "chk_upload_helper.encoded_bytes": 0, }