perf: bool() elements of dirstate.status return instead of len()
authorAugie Fackler <augie@google.com>
Thu, 14 Nov 2019 15:29:27 -0500
changeset 43653 6186c2a53ea5
parent 43652 ba5c39b9324c
child 43654 c5548b0b6847
perf: bool() elements of dirstate.status return instead of len() I'm about to make scmutil.status no longer have a len(), so we need to do something else to "use" the results in this perf method. Differential Revision: https://phab.mercurial-scm.org/D7405
contrib/perf.py
--- a/contrib/perf.py	Thu Nov 14 15:28:44 2019 -0500
+++ b/contrib/perf.py	Thu Nov 14 15:29:27 2019 -0500
@@ -788,7 +788,7 @@
             s = dirstate.status(
                 m, subrepos=[], ignored=False, clean=False, unknown=unknown
             )
-            sum(map(len, s))
+            sum(map(bool, s))
 
         timer(status_dirstate)
     else: