mercurial/statprof.py
changeset 43104 74802979dd9d
parent 43088 0d612db7047c
child 43106 d783f945a701
--- a/mercurial/statprof.py	Sun Oct 06 17:45:05 2019 -0400
+++ b/mercurial/statprof.py	Sun Oct 06 17:59:15 2019 -0400
@@ -475,7 +475,7 @@
                 if i == 0:
                     sitestat.addself()
 
-        return [s for s in stats.itervalues()]
+        return [s for s in pycompat.itervalues(stats)]
 
 
 class DisplayFormats:
@@ -744,7 +744,7 @@
         site = node.site
         visiblechildren = [
             c
-            for c in node.children.itervalues()
+            for c in pycompat.itervalues(node.children)
             if c.count >= (limit * root.count)
         ]
         if site:
@@ -752,7 +752,7 @@
             filename = b''
             function = b''
             if len(node.children) > 0:
-                childsite = list(node.children.itervalues())[0].site
+                childsite = list(pycompat.itervalues(node.children))[0].site
                 filename = (childsite.filename() + b':').ljust(15)
                 function = childsite.function
 
@@ -777,7 +777,9 @@
             )
 
             finalstring = liststring + codestring
-            childrensamples = sum([c.count for c in node.children.itervalues()])
+            childrensamples = sum(
+                [c.count for c in pycompat.itervalues(node.children)]
+            )
             # Make frames that performed more than 10% of the operation red
             if node.count - childrensamples > (0.1 * root.count):
                 finalstring = b'\033[91m' + finalstring + b'\033[0m'