Mercurial > hg
diff mercurial/debugcommands.py @ 44635:99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
This is useful to assess the density of the cache.
Differential Revision: https://phab.mercurial-scm.org/D8192
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 28 Feb 2020 03:18:57 +0100 |
parents | c989737158aa |
children | 649fd6c3ed33 |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Fri Feb 28 03:05:52 2020 +0100 +++ b/mercurial/debugcommands.py Fri Feb 28 03:18:57 2020 +0100 @@ -2146,6 +2146,8 @@ ui.write((b"tip-node: %s\n") % hex(docket.tip_node)) ui.write((b"data-length: %d\n") % docket.data_length) ui.write((b"data-unused: %d\n") % docket.data_unused) + unused_perc = docket.data_unused * 100.0 / docket.data_length + ui.write((b"data-unused: %2.3f%%\n") % unused_perc) @command(