Rev 2669: Stop tracking medium bytes if we aren't going to use it in http://bzr.arbash-meinel.com/branches/bzr/0.19-dev/hpss_debug_timing
John Arbash Meinel
john at arbash-meinel.com
Tue Jul 31 22:20:33 BST 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.19-dev/hpss_debug_timing
------------------------------------------------------------
revno: 2669
revision-id: john at arbash-meinel.com-20070731212002-tq2bht51jbfedjlk
parent: john at arbash-meinel.com-20070731203847-2k1kby0spd95pcr2
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: hpss_debug_timing
timestamp: Tue 2007-07-31 16:20:02 -0500
message:
Stop tracking medium bytes if we aren't going to use it
modified:
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
-------------- next part --------------
=== modified file 'bzrlib/smart/medium.py'
--- a/bzrlib/smart/medium.py 2007-07-31 20:31:01 +0000
+++ b/bzrlib/smart/medium.py 2007-07-31 21:20:02 +0000
@@ -255,8 +255,6 @@
# pattern as BodyReader if it gets more complex.
# valid states are: "writing", "reading", "done"
self._state = "writing"
- self._bytes_written = 0
- self._bytes_read = 0
def accept_bytes(self, bytes):
"""Accept bytes for inclusion in this request.
@@ -270,7 +268,6 @@
"""
if self._state != "writing":
raise errors.WritingCompleted(self)
- self._bytes_written += len(bytes)
self._accept_bytes(bytes)
def _accept_bytes(self, bytes):
@@ -337,9 +334,6 @@
raise errors.WritingNotComplete(self)
if self._state != "reading":
raise errors.ReadingCompleted(self)
- # Technically we haven't read them yet, but we are assuming we will get
- # this many bytes back.
- self._bytes_read += count
return self._read_bytes(count)
def _read_bytes(self, count):
More information about the bazaar-commits
mailing list