[MERGE] Extend -Dhpss to emit a count of HPSS calls to stderr
John Arbash Meinel
john at arbash-meinel.com
Wed Oct 1 02:31:21 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Bennetts wrote:
> Andrew Bennetts wrote:
>> This patch extends the -Dhpss option to dump a count of HPSS calls to
>> stderr for each SmartClientMedium that was used.
>
> This updates the patch based on feedback on the list and on IRC.
>
> It's based on the alternative patch from my original mail. The main changes
> from my original submission:
>
> * only installs one hook function for the lifetime of the process
> * uses trace.note rather than print to stderr
> * removes the unnecessary parentheses from the output
> * uses a WeakKeyDictionary to track the counts per medium
> * it still adds its own weakref so that the _DebugCounter can report the value
> in the WeakKeyDictionary before the WeakKeyDictionary destroys it.
>
> I still use both weakref callbacks and an atexit function as a last resort. It
> feels cleaner to at least try to remove things as soon as possible, and the
> atexit fallback is pretty trivial, so I don't feel the redundancy is a big
> issue.
>
> -Andrew.
>
>
BB:approve
Though you may want to wait for Vincent's comments. And this does look
quite bit nicer than the earlier form. In fact I think it looks quite good.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkji0ukACgkQJdeBCYSNAAN41gCfY+bQAYb6CoLgdHa6odhCnKHu
FjMAoLEP4GINTuINW9XxMgu0P0KRXsda
=I2t/
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list