Rev 2: Small updates to also time how long it takes to open the working tree, etc. in http://bzr.arbash-meinel.com/plugins/time_iter_changes
John Arbash Meinel
john at arbash-meinel.com
Wed Oct 21 19:23:09 BST 2009
At http://bzr.arbash-meinel.com/plugins/time_iter_changes
------------------------------------------------------------
revno: 2
revision-id: john at arbash-meinel.com-20091021182252-7t91cne2q2aczy1i
parent: john at arbash-meinel.com-20091021182139-jbwv6gbucf1g89vu
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: time_iter_changes
timestamp: Wed 2009-10-21 13:22:52 -0500
message:
Small updates to also time how long it takes to open the working tree, etc.
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py 2009-10-21 18:21:39 +0000
+++ b/__init__.py 2009-10-21 18:22:52 +0000
@@ -22,8 +22,10 @@
"""Run 'tree.iter_changes(tree.basis_tree())' and report the timing."""
def run(self):
+ t = time.time()
from bzrlib import workingtree
tree = workingtree.WorkingTree.open_containing('.')[0]
+ t_open_wt = time.time() - t
tree.lock_read()
try:
t = time.time()
@@ -31,6 +33,7 @@
delta = time.time() - t
finally:
tree.unlock()
- self.outf.write('%d changes in %.3fs\n' % (len(changes), delta))
+ self.outf.write('%d changes in %.3fs, %.3fs to open tree\n'
+ % (len(changes), delta, t_open_wt))
commands.register_command(cmd_time_iter_changes)
More information about the bazaar-commits
mailing list