From patchwork Fri Nov 23 14:08:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03,of,13] perf: use an explicit function in perfbranchmapload From: Boris Feld X-Patchwork-Id: 36731 Message-Id: <56efcdd74aee7b45d2b8.1542982139@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Fri, 23 Nov 2018 15:08:59 +0100 # HG changeset patch # User Boris Feld # Date 1542933177 -3600 # Fri Nov 23 01:32:57 2018 +0100 # Node ID 56efcdd74aee7b45d2b85a7d414033cae6b465c7 # Parent 9f29b499e0adb22a3fd23f8e88ea281d1073aa3f # EXP-Topic perf-branchmap # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 56efcdd74aee perf: use an explicit function in perfbranchmapload This make things clearer. diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -2199,7 +2199,9 @@ def perfbranchmapload(ui, repo, filter=b raise error.Abort(b'No branchmap cached for %s repo' % (filter or b'unfiltered')) timer, fm = gettimer(ui, opts) - timer(lambda: branchmap.read(repo) and None) + def bench(): + branchmap.read(repo) + timer(bench) fm.end() @command(b'perfloadmarkers')