[reviewing MERGE] Extend -Dhpss to emit a count of HPSS calls to stderr
Andrew Bennetts
andrew at canonical.com
Fri Sep 26 08:18:08 BST 2008
Vincent Ladeuil wrote:
[...]
>
> Right, I realized that during dinner. But if that explained the
> huge difference in counters, that doesn't explain all the mediums
> with 0 calls. Or is it an artefact of the multiple inheritance ?
> But in that case why ?
Yes, it's because RemoteTransport inherits from SmartClientMedium. So
each RemoteTransport that is instantiated (as happens a lot, e.g. on
every clone() call) adds an entry to the counts dict.
Specifically, RemoteSSHTransport.__init__ calls RemoteTransport.__init__
calls SmartClientMedium.__init__, which adds “self” as an object to
track for the HPSS call reporting. (In the case of your patch, via the
register_medium() call.)
-Andrew.
More information about the bazaar
mailing list