Mercurial > hg
comparison contrib/perf.py @ 43127:0b32206c3c86
perf: document `perfdirfoldmap`
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 08 Oct 2019 01:49:18 -0400 |
parents | e337d8247375 |
children | ad801d4af7cd |
comparison
equal
deleted
inserted
replaced
43126:e337d8247375 | 43127:0b32206c3c86 |
---|---|
1161 fm.end() | 1161 fm.end() |
1162 | 1162 |
1163 | 1163 |
1164 @command(b'perfdirfoldmap', formatteropts) | 1164 @command(b'perfdirfoldmap', formatteropts) |
1165 def perfdirfoldmap(ui, repo, **opts): | 1165 def perfdirfoldmap(ui, repo, **opts): |
1166 """benchmap a `dirstate._map.dirfoldmap.get()` request | |
1167 | |
1168 The dirstate dirfoldmap cache is dropped between every request. | |
1169 """ | |
1166 opts = _byteskwargs(opts) | 1170 opts = _byteskwargs(opts) |
1167 timer, fm = gettimer(ui, opts) | 1171 timer, fm = gettimer(ui, opts) |
1168 dirstate = repo.dirstate | 1172 dirstate = repo.dirstate |
1169 b'a' in dirstate | 1173 b'a' in dirstate |
1170 | 1174 |