[diffoscope] 05/05: Profile the high-level "compare_files" recursive method.

Chris Lamb chris at chris-lamb.co.uk
Fri Dec 23 12:46:22 CET 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit 02ca5e6190de5f73dc11f8263153bcecca409eda
Author: Chris Lamb <lamby at debian.org>
Date:   Fri Dec 23 11:39:55 2016 +0000

    Profile the high-level "compare_files" recursive method.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 diffoscope/comparators/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/diffoscope/comparators/__init__.py b/diffoscope/comparators/__init__.py
index 7113db3..63f43a8 100644
--- a/diffoscope/comparators/__init__.py
+++ b/diffoscope/comparators/__init__.py
@@ -146,7 +146,8 @@ def compare_files(file1, file2, source=None):
         file2.other_file = file1
     elif file1.__class__.__name__ != file2.__class__.__name__:
         return file1.compare_bytes(file2, source)
-    return file1.compare(file2, source)
+    with profile('compare_files (cumulative)', file1):
+        return file1.compare(file2, source)
 
 def compare_commented_files(file1, file2, comment=None, source=None):
     difference = compare_files(file1, file2, source=source)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list