[PATCH 1 of 4] perf: report more of the higher range in perfrevlogwrite

Boris Feld boris.feld at octobus.net
Fri Dec 14 21:24:35 UTC 2018


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1544089110 -3600
#      Thu Dec 06 10:38:30 2018 +0100
# Node ID db0227d6f9291d9dac23f6f07699cf1fb7d1ea3d
# Parent  e13ab4acf555daf8fac593127b6a076288551710
# EXP-Topic sparse-revlog-corner-cases
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r db0227d6f929
perf: report more of the higher range in perfrevlogwrite

Since the delta chain length is limited to 1000 revisions, we get a new
snapshot about every 1000 revisions. If we assume that the snapshot will be
most of the slowest revision, the current display (99% and max) are not very
precise in their area. We now include more information about this space in the
default report.

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1776,6 +1776,9 @@ def perfrevlogwrite(ui, repo, file_=None
         ("90%", resultcount * 90 // 100),
         ("95%", resultcount * 95 // 100),
         ("99%", resultcount * 99 // 100),
+        ("99.9%", resultcount * 999 // 1000),
+        ("99.99%", resultcount * 9999 // 10000),
+        ("99.999%", resultcount * 99999 // 100000),
         ("max", -1),
     ]
     if not ui.quiet:


More information about the Mercurial-devel mailing list