[Fwd: Rev 3525: (robertc) Add -Dmemory for quick memory gathering. (Robert Collins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/]
John Arbash Meinel
john at arbash-meinel.com
Fri Jul 4 16:44:41 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This seems fine, but you need to add it to the list in bzrlib.debug, and
the associated test. (I think it is a source test)
...
John
=:->
=== modified file 'NEWS'
- --- a/NEWS 2008-07-04 03:56:20 +0000
+++ b/NEWS 2008-07-04 07:21:29 +0000
@@ -83,6 +83,9 @@
~ TESTING:
+ * ``-Dmemory`` will cause /proc/PID/status to be catted before bzr
+ exits, allowing low-key analysis of peak memory use. (Robert Collins)
+
~ * ``TestCaseWithTransport.make_branch_and_tree`` tries harder to return
~ a tree with a ``branch`` attribute of the right format. This was
~ preventing some ``RemoteBranch`` tests from actually running with
=== modified file 'bzrlib/commands.py'
- --- a/bzrlib/commands.py 2008-05-28 23:20:33 +0000
+++ b/bzrlib/commands.py 2008-07-04 07:01:19 +0000
@@ -795,6 +795,17 @@
~ ret = apply_coveraged(opt_coverage_dir, run, *run_argv)
~ else:
~ ret = run(*run_argv)
+ if 'memory' in debug.debug_flags:
+ try:
+ status_file = file('/proc/%s/status' % os.getpid(), 'rb')
+ except IOError:
+ pass
+ else:
+ status = status_file.read()
+ status_file.close()
+ trace.note("Process status after command:")
+ for line in status.splitlines():
+ trace.note(line)
~ return ret or 0
~ finally:
~ # reset, in case we may do other commands later within the same
process
- --
bazaar-commits mailing list
bazaar-commits at lists.canonical.com
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhuRWkACgkQJdeBCYSNAAOzCwCfb6CEwqdon0ItGoqRysueMAx5
biEAn3MzqjF3ItOQZ5f3CnPSmCghwL8/
=xmM/
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list