Rev 2668: Switch around what bytes get logged. 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 21:39:17 BST 2007


At http://bzr.arbash-meinel.com/branches/bzr/0.19-dev/hpss_debug_timing

------------------------------------------------------------
revno: 2668
revision-id: john at arbash-meinel.com-20070731203847-2k1kby0spd95pcr2
parent: john at arbash-meinel.com-20070731203101-p7h45wm6v4x6nb18
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: hpss_debug_timing
timestamp: Tue 2007-07-31 15:38:47 -0500
message:
  Switch around what bytes get logged.
  Don't bother writing the header bytes, because you know what was
  written by the tuple you see logged.
modified:
  bzrlib/smart/protocol.py       protocol.py-20061108035435-ot0lstk2590yqhzr-1
-------------- next part --------------
=== modified file 'bzrlib/smart/protocol.py'
--- a/bzrlib/smart/protocol.py	2007-07-31 20:31:01 +0000
+++ b/bzrlib/smart/protocol.py	2007-07-31 20:38:47 +0000
@@ -314,7 +314,7 @@
         """
         if 'hpss' in debug.debug_flags:
             mutter('hpss call w/body: %s (%r...)', repr(args)[1:-1], body[:20])
-            mutter('         %8d bytes', len(body))
+            mutter('              %d bytes', len(body))
             self._request_start_time = time.time()
         self._write_args(args)
         bytes = self._encode_bulk_data(body)
@@ -336,7 +336,7 @@
         self._request.accept_bytes(bytes)
         self._request.finished_writing()
         if 'hpss' in debug.debug_flags:
-            mutter('         %8d bytes', len(readv_bytes))
+            mutter('              %d bytes in readv request', len(readv_bytes))
 
     def cancel_read_body(self):
         """After expecting a body, a response code may indicate one otherwise.
@@ -361,8 +361,6 @@
                 self._request_start_time = None
             else:
                 mutter('   result:   %s', repr(result)[1:-1])
-            mutter('         %8d bytes written',
-                   self._request._bytes_written)
         if not expect_body:
             self._request.finished_reading()
         return result
@@ -385,7 +383,7 @@
         self._body_buffer = StringIO(_body_decoder.read_pending_data())
         # XXX: TODO check the trailer result.
         if 'hpss' in debug.debug_flags:
-            mutter('         %8d body bytes read',
+            mutter('              %d body bytes read',
                    len(self._body_buffer.getvalue()))
         return self._body_buffer.read(count)
 



More information about the bazaar-commits mailing list