Mercurial > hg
comparison contrib/perf.py @ 46780:6266d19556ad
node: introduce nodeconstants class
In preparing for moving from SHA1 hashes to a modern hash function,
place nullid and other constant magic vules in a class. Provide the
active set of constants in the repository and push it down. Provide
nullid directly in strategic places like the repository as it is
accessed very often. This changeset introduces the API change, but not
the mechanical replacement of the node.py attributes itself.
Differential Revision: https://phab.mercurial-scm.org/D9750
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Wed, 13 Jan 2021 16:14:58 +0100 |
parents | 66fb04552122 |
children | 92029a43debb |
comparison
equal
deleted
inserted
replaced
46779:49fd21f32695 | 46780:6266d19556ad |
---|---|
3670 """benchmark the time to parse the on-disk markers for a repo | 3670 """benchmark the time to parse the on-disk markers for a repo |
3671 | 3671 |
3672 Result is the number of markers in the repo.""" | 3672 Result is the number of markers in the repo.""" |
3673 timer, fm = gettimer(ui) | 3673 timer, fm = gettimer(ui) |
3674 svfs = getsvfs(repo) | 3674 svfs = getsvfs(repo) |
3675 timer(lambda: len(obsolete.obsstore(svfs))) | 3675 timer(lambda: len(obsolete.obsstore(repo, svfs))) |
3676 fm.end() | 3676 fm.end() |
3677 | 3677 |
3678 | 3678 |
3679 @command( | 3679 @command( |
3680 b'perf::lrucachedict|perflrucachedict', | 3680 b'perf::lrucachedict|perflrucachedict', |