contrib/perf.py
changeset 24349 389693a245fa
parent 23878 37a92908a382
child 24607 f5b527024fcc
--- a/contrib/perf.py	Sun Mar 15 21:52:35 2015 -0400
+++ b/contrib/perf.py	Wed Mar 18 12:03:44 2015 -0500
@@ -293,6 +293,25 @@
     timer(d)
     fm.end()
 
+@command('perfctxfiles')
+def perfparents(ui, repo, x):
+    x = int(x)
+    timer, fm = gettimer(ui)
+    def d():
+        len(repo[x].files())
+    timer(d)
+    fm.end()
+
+@command('perfrawfiles')
+def perfparents(ui, repo, x):
+    x = int(x)
+    timer, fm = gettimer(ui)
+    cl = repo.changelog
+    def d():
+        len(cl.read(x)[3])
+    timer(d)
+    fm.end()
+
 @command('perflookup')
 def perflookup(ui, repo, rev):
     timer, fm = gettimer(ui)