~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-14 23:32:17 UTC
  • mfrom: (4889.2.6 2.1-Dhpss-server)
  • Revision ID: pqm@pqm.ubuntu.com-20091214233217-rwmfxbxwvgj292k0
(jam) -Dhpss now triggers extra logging on the server side.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
from bzrlib.lazy_import import lazy_import
34
34
lazy_import(globals(), """
35
35
import atexit
 
36
import threading
36
37
import weakref
 
38
 
37
39
from bzrlib import (
38
40
    debug,
39
41
    errors,
295
297
        self.finished = True
296
298
 
297
299
    def _write_out(self, bytes):
 
300
        tstart = osutils.timer_func()
298
301
        osutils.send_all(self.socket, bytes, self._report_activity)
 
302
        if 'hpss' in debug.debug_flags:
 
303
            thread_id = threading.currentThread().ident
 
304
            trace.mutter('%12s: [%s] %d bytes to the socket in %.3fs'
 
305
                         % ('wrote', thread_id, len(bytes),
 
306
                            osutils.timer_func() - tstart))
299
307
 
300
308
 
301
309
class SmartServerPipeStreamMedium(SmartServerStreamMedium):