comparison mercurial/wireproto.py @ 25339:c50655b9c856

listkey: display the size of the listkey payload in a debug message This is a useful information to have in general and we already have debug output related to listkeys. I'm planning to play around with massive amount of phases roots and bookmarks so having this data in debug will be very useful. This already got me to spot that one of the Logilab's review repo is exchanging 65KB of phases data during each exchanges.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 28 May 2015 23:49:19 -0700
parents a415e94fd34f
children 30ab130af221
comparison
equal deleted inserted replaced
25338:405303df6a2a 25339:c50655b9c856
322 yield {}, None 322 yield {}, None
323 f = future() 323 f = future()
324 self.ui.debug('preparing listkeys for "%s"\n' % namespace) 324 self.ui.debug('preparing listkeys for "%s"\n' % namespace)
325 yield {'namespace': encoding.fromlocal(namespace)}, f 325 yield {'namespace': encoding.fromlocal(namespace)}, f
326 d = f.value 326 d = f.value
327 self.ui.debug('received listkey for "%s": %i bytes\n'
328 % (namespace, len(d)))
327 yield pushkeymod.decodekeys(d) 329 yield pushkeymod.decodekeys(d)
328 330
329 def stream_out(self): 331 def stream_out(self):
330 return self._callstream('stream_out') 332 return self._callstream('stream_out')
331 333