[reviewing MERGE] Extend -Dhpss to emit a count of HPSS calls to stderr
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Sep 26 08:50:22 BST 2008
>>>>> "Andrew" == Andrew Bennetts <andrew at canonical.com> writes:
Andrew> Vincent Ladeuil wrote:
Andrew> [...]
>>
>> 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 ?
Andrew> Yes, it's because RemoteTransport inherits from
Andrew> SmartClientMedium. So each RemoteTransport that is
Andrew> instantiated (as happens a lot, e.g. on every clone()
Andrew> call) adds an entry to the counts dict.
Andrew> Specifically, RemoteSSHTransport.__init__ calls
Andrew> RemoteTransport.__init__ calls
Andrew> SmartClientMedium.__init__, which adds “self” as an
Andrew> object to track for the HPSS call reporting. (In the
Andrew> case of your patch, via the register_medium() call.)
Thanks.
And confirmed by trying against my python-2.6 branch with the
patch deleting the multiple inheritance: the spurious mediums
have disappeared :)
Vincent
More information about the bazaar
mailing list